@simple-reporting/base 1.0.36 → 1.0.38
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/dev/.ddev/config.yaml +1 -1
- package/dev/.idea/codeStyles/Project.xml +61 -0
- package/dev/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/dev/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/dev/.idea/deployment.xml +14 -0
- package/dev/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/dev/.idea/modules.xml +8 -0
- package/dev/.idea/nsfd_report-demo-mms.iml +8 -0
- package/dev/.idea/php.xml +19 -0
- package/dev/.idea/prettier.xml +6 -0
- package/dev/.idea/vcs.xml +6 -0
- package/dev/.idea/watcherTasks.xml +4 -0
- package/dev/livingdocs.config.json +1192 -27
- package/dev/package.json +2 -3
- package/dev/src/App.vue +1 -2
- package/dev/src/Autoload.ts +1 -1
- package/dev/src/Dialog.vue +12 -61
- package/dev/src/assets/fonts/FontAwesome/font.scss +2 -0
- package/dev/src/assets/fonts/Inter/inter.scss +2 -4
- package/dev/src/assets/images/accordion-minus.svg +4 -0
- package/dev/src/assets/images/accordion-plus.svg +4 -0
- package/dev/src/assets/images/arrow-left.svg +5 -0
- package/dev/src/assets/images/arrow-right.svg +5 -0
- package/dev/src/assets/images/arrow-up.svg +5 -0
- package/dev/src/assets/images/chevron-down.svg +1 -0
- package/dev/src/assets/images/chevron-left.svg +1 -0
- package/dev/src/assets/images/chevron-right.svg +1 -0
- package/dev/src/assets/images/chevron-up.svg +1 -0
- package/dev/src/assets/images/close.svg +5 -0
- package/dev/src/assets/images/download.svg +6 -0
- package/dev/src/assets/images/facebook.svg +1 -0
- package/dev/src/assets/images/instagram.svg +1 -0
- package/dev/src/assets/images/language.svg +1 -0
- package/dev/src/assets/images/linkedIn.svg +1 -0
- package/dev/src/assets/images/logo.svg +1 -0
- package/dev/src/assets/images/menu-light.svg +3 -0
- package/dev/src/assets/images/menu.svg +3 -0
- package/dev/src/assets/images/nav-arrow-left.svg +3 -0
- package/dev/src/assets/images/nav-arrow-right.svg +3 -0
- package/dev/src/assets/images/search.svg +5 -0
- package/dev/src/assets/images/twitter.svg +1 -0
- package/dev/src/assets/images/xing.svg +1 -0
- package/dev/src/assets/scss/app.scss +9 -0
- package/dev/src/assets/scss/components/button.scss +37 -0
- package/dev/src/assets/scss/components/dialog.scss +84 -0
- package/dev/src/assets/scss/components/fontawesome.scss +56 -0
- package/dev/src/assets/scss/components/note/accordion.scss +55 -41
- package/dev/src/assets/scss/editor.scss +5 -5
- package/dev/src/assets/scss/general.scss +29 -2
- package/dev/src/assets/scss/margins.scss +57 -0
- package/dev/src/assets/scss/pdf.scss +0 -32
- package/dev/src/assets/scss/placeholders/breakout-grid.scss +34 -0
- package/dev/src/assets/scss/placeholders/button.scss +230 -0
- package/dev/src/assets/scss/placeholders/fontawesome.scss +7 -0
- package/dev/src/assets/scss/placeholders/grid.scss +354 -0
- package/dev/src/assets/scss/web.scss +17 -21
- package/dev/src/assets/scss/xbrl.scss +1 -0
- package/dev/src/components/Button/Default/Action.vue +65 -0
- package/dev/src/components/Button/Default/Content.vue +225 -0
- package/dev/src/components/Button/Default/ExternalLink.vue +63 -0
- package/dev/src/components/Button/Default/InternalLink.vue +64 -0
- package/dev/src/components/Button/Default.vue +101 -0
- package/dev/src/components/Page/MainNavigation.vue +96 -6
- package/dev/src/components/Page/MetaNavigation.vue +116 -0
- package/dev/src/components/Page/PrevNext.vue +140 -70
- package/dev/src/components/PageFooter.vue +405 -0
- package/dev/src/components/PageHeader.vue +828 -0
- package/dev/src/components/{Page/Main.vue → PageMain.vue} +11 -0
- package/dev/src/composables/globalLinks.ts +46 -0
- package/dev/src/composables/isDesktopView.ts +18 -0
- package/dev/src/composables/mainNavigation.ts +11 -0
- package/dev/src/entries/pdf.ts +5 -5
- package/dev/src/i18n/index.ts +1 -1
- package/dev/src/locales/de.json +40 -0
- package/dev/src/locales/en.json +40 -0
- package/dev/src/router/index.ts +1 -2
- package/dev/src/views/DevView.vue +1 -835
- package/dev/src/views/PageNotFound.vue +3 -69
- package/dev/srl.config.json +34 -49
- package/livingdocs/010.Titles/010.title-h1/scss/_spacing-variations.scss +17 -0
- package/livingdocs/010.Titles/010.title-h1/scss/general.scss +4 -0
- package/livingdocs/010.Titles/020.title-h2/scss/_spacing-variations.scss +12 -0
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +4 -0
- package/livingdocs/010.Titles/020.title-h2/title-h2.html +2 -1
- package/livingdocs/010.Titles/030.title-h3/scss/_spacing-variations.scss +13 -0
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +5 -1
- package/livingdocs/010.Titles/030.title-h3/title-h3.html +2 -1
- package/livingdocs/010.Titles/040.title-h4/scss/_spacing-variations.scss +12 -0
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +5 -1
- package/livingdocs/010.Titles/040.title-h4/title-h4.html +2 -1
- package/livingdocs/010.Titles/050.title-h5/scss/_spacing-variations.scss +11 -0
- package/livingdocs/010.Titles/050.title-h5/scss/general.scss +4 -0
- package/livingdocs/010.Titles/060.title-h6/scss/_spacing-variations.scss +10 -0
- package/livingdocs/010.Titles/060.title-h6/scss/general.scss +4 -0
- package/livingdocs/020.Text/010.lead/scss/_spacing-variations.scss +5 -0
- package/livingdocs/020.Text/010.lead/scss/general.scss +4 -0
- package/livingdocs/020.Text/020.paragraph/scss/_spacing-variations.scss +22 -0
- package/livingdocs/020.Text/020.paragraph/scss/general.scss +4 -0
- package/livingdocs/020.Text/060.quote-with-portrait/scss/_spacing-variations.scss +7 -0
- package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +4 -1
- package/livingdocs/020.Text/060.quote-with-portrait/scss/pdf.scss +4 -10
- package/livingdocs/020.Text/060.quote-with-portrait/scss/web.scss +0 -1
- package/livingdocs/020.Text/070.footnote-container/scss/_spacing-variations.scss +22 -0
- package/livingdocs/020.Text/070.footnote-container/scss/general.scss +8 -0
- package/livingdocs/020.Text/070.footnote-container/scss/pdf.scss +0 -8
- package/livingdocs/020.Text/070.footnote-container/scss/web.scss +0 -5
- package/livingdocs/020.Text/070.footnote-container/scss/xbrl.scss +9 -1
- package/livingdocs/020.Text/080.footnote-item/scss/_spacing-variations.scss +4 -0
- package/livingdocs/020.Text/080.footnote-item/scss/general.scss +28 -1
- package/livingdocs/020.Text/080.footnote-item/scss/web.scss +0 -20
- package/livingdocs/020.Text/080.footnote-item/scss/xbrl.scss +26 -1
- package/livingdocs/030.Lists/010.unordered-list/ld-conf.json +3 -3
- package/livingdocs/030.Lists/010.unordered-list/scss/_spacing-variations.scss +22 -0
- package/livingdocs/030.Lists/010.unordered-list/scss/general.scss +3 -5
- package/livingdocs/030.Lists/010.unordered-list/scss/pdf.scss +3 -1
- package/livingdocs/030.Lists/010.unordered-list/scss/web.scss +15 -1
- package/livingdocs/030.Lists/010.unordered-list/scss/word.scss +1 -6
- package/livingdocs/030.Lists/010.unordered-list/scss/xbrl.scss +2 -1
- package/livingdocs/030.Lists/020.ordered-list/ld-conf.json +3 -3
- package/livingdocs/030.Lists/030.alphanumeric-list/ld-conf.json +3 -3
- package/livingdocs/030.Lists/040.list-item-unordered-list/ld-conf.json +23 -0
- package/livingdocs/030.Lists/040.list-item-unordered-list/list-item-unordered-list.html +8 -0
- package/livingdocs/030.Lists/040.list-item-unordered-list/scss/_spacing-variations.scss +4 -0
- package/livingdocs/030.Lists/040.list-item-unordered-list/scss/general.scss +14 -0
- package/livingdocs/030.Lists/{040.list-item → 040.list-item-unordered-list}/scss/pdf.scss +7 -1
- package/livingdocs/030.Lists/{040.list-item/scss/general.scss → 040.list-item-unordered-list/scss/web.scss} +17 -6
- package/livingdocs/030.Lists/040.list-item-unordered-list/scss/word.scss +5 -0
- package/livingdocs/030.Lists/040.list-item-unordered-list/scss/xbrl.scss +2 -0
- package/livingdocs/030.Lists/050.list-item-ordered-list/ld-conf.json +23 -0
- package/livingdocs/030.Lists/050.list-item-ordered-list/list-item-ordered-list.html +8 -0
- package/livingdocs/030.Lists/060.list-item-alphanumeric-list/ld-conf.json +23 -0
- package/livingdocs/030.Lists/060.list-item-alphanumeric-list/list-item-alphanumeric-list.html +8 -0
- package/livingdocs/040.Media/010.table/scss/_spacing-variations.scss +19 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +270 -251
- package/livingdocs/040.Media/010.table/scss/pdf.scss +2 -18
- package/livingdocs/040.Media/010.table/scss/web.scss +0 -19
- package/livingdocs/040.Media/010.table/scss/xbrl.scss +4 -3
- package/livingdocs/040.Media/020.image/scss/_spacing-variations.scss +7 -0
- package/livingdocs/040.Media/020.image/scss/editor.scss +0 -1
- package/livingdocs/040.Media/020.image/scss/general.scss +6 -2
- package/livingdocs/040.Media/020.image/scss/pdf.scss +0 -4
- package/livingdocs/040.Media/020.image/scss/web.scss +0 -5
- package/livingdocs/040.Media/020.image/scss/xbrl.scss +1 -3
- package/livingdocs/040.Media/030.video/scss/_spacing-variations.scss +7 -0
- package/livingdocs/040.Media/030.video/scss/general.scss +19 -0
- package/livingdocs/040.Media/030.video/scss/pdf.scss +0 -10
- package/livingdocs/040.Media/030.video/scss/web.scss +0 -11
- package/livingdocs/040.Media/030.video/scss/xbrl.scss +1 -4
- package/livingdocs/060.Buttons/020.button/scss/general.scss +14 -75
- package/livingdocs/070.Container/020.columns-container/columns-container.html +1 -1
- package/livingdocs/070.Container/030.background-container/background-container.html +3 -0
- package/livingdocs/070.Container/030.background-container/ld-conf.json +4 -0
- package/livingdocs/070.Container/030.background-container/properties.json +1 -0
- package/livingdocs/070.Container/030.background-container/scss/_spacing-variations.scss +3 -0
- package/livingdocs/070.Container/030.background-container/scss/general.scss +9 -0
- package/livingdocs/070.Container/030.background-container/scss/pdf.scss +13 -0
- package/livingdocs/070.Container/030.background-container/scss/web.scss +1 -0
- package/livingdocs/070.Container/030.background-container/scss/word.scss +1 -0
- package/livingdocs/070.Container/030.background-container/scss/xbrl.scss +3 -0
- package/livingdocs/080.CV/010.cv/cv.html +2 -1
- package/livingdocs/080.CV/010.cv/scss/_spacing-variations.scss +5 -0
- package/livingdocs/080.CV/010.cv/scss/app.scss +16 -1
- package/livingdocs/080.CV/010.cv/scss/general.scss +4 -0
- package/livingdocs/080.CV/010.cv/scss/pdf.scss +2 -3
- package/livingdocs/080.CV/010.cv/scss/web.scss +17 -1
- package/livingdocs/080.CV/020.cv-time-span/scss/_spacing-variations.scss +14 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/general.scss +4 -0
- package/livingdocs/080.CV/020.cv-time-span/scss/web.scss +0 -1
- package/livingdocs/100.Misc/010.anchor/scss/editor.scss +0 -1
- package/livingdocs/100.Misc/020.accordion/accordion.html +54 -7
- package/livingdocs/100.Misc/020.accordion/accordion.vue +83 -0
- package/livingdocs/100.Misc/020.accordion/scss/editor.scss +12 -0
- package/livingdocs/110.PDF/010.pdf-pagebreak/scss/editor.scss +0 -1
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/editor.scss +0 -1
- package/livingdocs/110.PDF/030.pdf-publication-title/scss/editor.scss +0 -1
- package/livingdocs/110.PDF/040.pdf-chapter-title/scss/editor.scss +0 -1
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/editor.scss +1 -1
- package/livingdocs/110.PDF/075.pdf-landscape-container/ld-conf.json +7 -0
- package/livingdocs/110.PDF/075.pdf-landscape-container/pdf-landscape-container.html +9 -0
- package/livingdocs/110.PDF/075.pdf-landscape-container/properties.json +15 -0
- package/livingdocs/110.PDF/075.pdf-landscape-container/scss/pdf.scss +19 -0
- package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +3 -2
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/general.scss +6 -5
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/pdf.scss +9 -1
- package/livingdocs/130.Hosting_Components/010.download-center/download-center.html +7 -0
- package/livingdocs/130.Hosting_Components/010.download-center/download-center.vue +68 -0
- package/livingdocs/130.Hosting_Components/010.download-center/ld-conf.json +4 -0
- package/livingdocs/130.Hosting_Components/010.download-center/properties.json +1 -0
- package/livingdocs/130.Hosting_Components/010.download-center/scss/_spacing-variations.scss +3 -0
- package/livingdocs/130.Hosting_Components/010.download-center/scss/editor.scss +15 -0
- package/livingdocs/130.Hosting_Components/010.download-center/scss/general.scss +1 -0
- package/livingdocs/130.Hosting_Components/010.download-center/scss/pdf.scss +1 -0
- package/livingdocs/130.Hosting_Components/010.download-center/scss/web.scss +42 -0
- package/livingdocs/130.Hosting_Components/020.search/ld-conf.json +4 -0
- package/livingdocs/130.Hosting_Components/020.search/properties.json +1 -0
- package/livingdocs/130.Hosting_Components/020.search/scss/_spacing-variations.scss +4 -0
- package/livingdocs/130.Hosting_Components/020.search/scss/editor.scss +14 -0
- package/livingdocs/130.Hosting_Components/020.search/scss/general.scss +1 -0
- package/livingdocs/130.Hosting_Components/020.search/scss/pdf.scss +1 -0
- package/livingdocs/130.Hosting_Components/020.search/scss/web.scss +200 -0
- package/livingdocs/130.Hosting_Components/020.search/search.html +7 -0
- package/livingdocs/130.Hosting_Components/020.search/search.vue +484 -0
- package/livingdocs/999.Properties/breakout-grid/web.scss +5 -0
- package/livingdocs/999.Properties/grid/scss/app.scss +1 -0
- package/livingdocs/999.Properties/grid/scss/general.scss +31 -0
- package/livingdocs/999.Properties/grid/scss/pdf.scss +9 -0
- package/livingdocs/999.Properties/grid/scss/web.scss +1 -0
- package/livingdocs/999.Properties/grid/scss/xbrl.scss +2 -0
- package/livingdocs/999.Properties/icon/properties.json +2 -2
- package/package.json +1 -1
- package/plugins/viteSrlPlugin.js +16 -1
- package/scripts/build.js +1 -0
- package/scripts/config.js +6 -2
- package/scss/button.scss +25 -0
- package/scss/fa/font-free.scss +17 -0
- package/scss/fa/font-pro.scss +41 -0
- package/scss/fa/index.scss +118 -0
- package/scss/fa/source-free.scss +14 -0
- package/scss/fa/source-pro.scss +15 -0
- package/scss/index.scss +1 -0
- package/srl/.srl/components/Srl/Aria/TabChain.vue +6 -5
- package/srl/.srl/components/Srl/Article/Accordion.vue +37 -24
- package/srl/.srl/components/Srl/Article/Dialog/Button.vue +6 -5
- package/srl/.srl/components/Srl/Article/Root.vue +4 -1
- package/srl/.srl/components/Srl/Category/Accordion/Content.vue +2 -2
- package/srl/.srl/components/Srl/Category/Accordion/Toggle.vue +17 -8
- package/srl/.srl/components/Srl/Category/Accordion.vue +8 -5
- package/srl/.srl/components/Srl/Menu/Item.vue +20 -5
- package/srl/.srl/components/Srl/Page/Dialog.vue +31 -14
- package/srl/.srl/types/nswow.d.ts +6 -1
- package/srl/.srl/utils/index.ts +2 -0
- package/srl/.srl/utils/pageState.ts +24 -23
- package/srl/srl/button.scss +2 -0
- package/srl/srl/fa/font-free.scss +17 -0
- package/srl/srl/fa/font-pro.scss +41 -0
- package/srl/srl/fa/index.scss +118 -0
- package/srl/srl/fa/source-free.scss +14 -0
- package/srl/srl/fa/source-pro.scss +15 -0
- package/dev/src/assets/fonts/Inter/Inter-Regular.ttf +0 -0
- package/dev/src/assets/fonts/Inter/Inter-SemiBold.ttf +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-300.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-700.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-italic.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-regular.woff2 +0 -0
- package/dev/src/assets/images/mms-logo-white.svg +0 -105
- package/dev/src/assets/scss/components/icons.scss +0 -287
- package/dev/src/assets/scss/components/round-button.scss +0 -75
- package/dev/src/assets/scss/placeholders.scss +0 -588
- package/dev/src/components/Page/Footer.vue +0 -45
- package/dev/src/components/Page/Header.vue +0 -40
- package/dev/src/views/HomeView.vue +0 -5
- package/livingdocs/030.Lists/020.ordered-list/scss/general.scss +0 -6
- package/livingdocs/030.Lists/020.ordered-list/scss/pdf.scss +0 -5
- package/livingdocs/030.Lists/020.ordered-list/scss/word.scss +0 -9
- package/livingdocs/030.Lists/020.ordered-list/scss/xbrl.scss +0 -1
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/general.scss +0 -6
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/pdf.scss +0 -5
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/word.scss +0 -9
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/xbrl.scss +0 -1
- package/livingdocs/030.Lists/040.list-item/ld-conf.json +0 -5
- package/livingdocs/030.Lists/040.list-item/list-item.html +0 -5
- package/livingdocs/030.Lists/040.list-item/scss/web.scss +0 -27
- package/livingdocs/030.Lists/040.list-item/scss/word.scss +0 -19
- package/livingdocs/030.Lists/040.list-item/scss/xbrl.scss +0 -1
- /package/livingdocs/030.Lists/{020.ordered-list → 040.list-item-unordered-list}/scss/app.scss +0 -0
- /package/livingdocs/030.Lists/{020.ordered-list → 040.list-item-unordered-list}/scss/editor.scss +0 -0
- /package/livingdocs/{030.Lists/030.alphanumeric-list → 070.Container/030.background-container}/scss/app.scss +0 -0
- /package/livingdocs/{030.Lists/030.alphanumeric-list → 070.Container/030.background-container}/scss/editor.scss +0 -0
- /package/livingdocs/{030.Lists/040.list-item → 130.Hosting_Components/010.download-center}/scss/app.scss +0 -0
- /package/{dev/livingdocs/.gitkeep → livingdocs/130.Hosting_Components/010.download-center/scss/word.scss} +0 -0
- /package/livingdocs/{030.Lists/020.ordered-list/scss/web.scss → 130.Hosting_Components/010.download-center/scss/xbrl.scss} +0 -0
- /package/livingdocs/{030.Lists/040.list-item/scss/editor.scss → 130.Hosting_Components/020.search/scss/app.scss} +0 -0
- /package/livingdocs/{030.Lists/030.alphanumeric-list/scss/web.scss → 130.Hosting_Components/020.search/scss/word.scss} +0 -0
- /package/livingdocs/{060.Buttons/.gitkeep → 130.Hosting_Components/020.search/scss/xbrl.scss} +0 -0
- /package/livingdocs/999.Properties/{width → grid}/properties.json +0 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
@use "srl/helpers";
|
|
2
|
+
@use "srl/system";
|
|
3
|
+
@use "srl/grid";
|
|
4
|
+
|
|
5
|
+
%srl-trim-margins {
|
|
6
|
+
@include helpers.trim-margins;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
%srl-grid-base {
|
|
10
|
+
@if system.$build == "pdf" {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: flex-end;
|
|
14
|
+
} @else {
|
|
15
|
+
margin-left: auto;
|
|
16
|
+
margin-right: auto;
|
|
17
|
+
@include grid.container();
|
|
18
|
+
@include grid.row();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
%srl-grid-reset {
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin-left: 0;
|
|
25
|
+
margin-right: 0;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
%srl-regular-width {
|
|
31
|
+
@if system.$build == "xbrl" {
|
|
32
|
+
@include grid.col(6);
|
|
33
|
+
@include grid.offset(3);
|
|
34
|
+
} @else if system.$build == "pdf" {
|
|
35
|
+
@include grid.pdf-flex-col(6);
|
|
36
|
+
} @else {
|
|
37
|
+
// Mobile
|
|
38
|
+
@include grid.col(4);
|
|
39
|
+
|
|
40
|
+
// Mobile landscape
|
|
41
|
+
@include grid.col(4, phone-ls);
|
|
42
|
+
|
|
43
|
+
// Tablet portrait
|
|
44
|
+
@include grid.col(8, tablet-pt);
|
|
45
|
+
|
|
46
|
+
// Tablet landscape
|
|
47
|
+
@include grid.col(8, tablet-ls);
|
|
48
|
+
@include grid.offset(2, tablet-ls);
|
|
49
|
+
|
|
50
|
+
// Desktop
|
|
51
|
+
@include grid.col(6, desktop);
|
|
52
|
+
@include grid.offset(3, desktop);
|
|
53
|
+
|
|
54
|
+
// Desktop large
|
|
55
|
+
@include grid.col(6, desktop-large);
|
|
56
|
+
@include grid.offset(3, desktop-large);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
%srl-wide-width {
|
|
61
|
+
@if system.$build == "xbrl" {
|
|
62
|
+
@include grid.col(12);
|
|
63
|
+
@include grid.offset(0);
|
|
64
|
+
} @else if system.$build == "pdf" {
|
|
65
|
+
@include grid.pdf-flex-col(8);
|
|
66
|
+
} @else {
|
|
67
|
+
// Mobile
|
|
68
|
+
@include grid.col(4);
|
|
69
|
+
|
|
70
|
+
// Mobile landscape
|
|
71
|
+
@include grid.col(4, phone-ls);
|
|
72
|
+
|
|
73
|
+
// Tablet portrait
|
|
74
|
+
@include grid.col(8, tablet-pt);
|
|
75
|
+
|
|
76
|
+
// Tablet landscape
|
|
77
|
+
@include grid.col(12, tablet-ls);
|
|
78
|
+
@include grid.offset(0, tablet-ls);
|
|
79
|
+
|
|
80
|
+
// Desktop
|
|
81
|
+
@include grid.col(12, desktop);
|
|
82
|
+
@include grid.offset(0, desktop);
|
|
83
|
+
|
|
84
|
+
// Desktop large
|
|
85
|
+
@include grid.col(12, desktop-large);
|
|
86
|
+
@include grid.offset(0, desktop-large);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
Quote without an image wide with
|
|
92
|
+
*/
|
|
93
|
+
%srl-quote-wide-width {
|
|
94
|
+
@if system.$build == "xbrl" {
|
|
95
|
+
@include grid.col(8);
|
|
96
|
+
@include grid.offset(2);
|
|
97
|
+
} @else if system.$build == "pdf" {
|
|
98
|
+
@include grid.pdf-flex-col(8);
|
|
99
|
+
} @else {
|
|
100
|
+
// Mobile
|
|
101
|
+
@include grid.col(4);
|
|
102
|
+
|
|
103
|
+
// Mobile landscape
|
|
104
|
+
@include grid.col(4, phone-ls);
|
|
105
|
+
|
|
106
|
+
// Tablet portrait
|
|
107
|
+
@include grid.col(8, tablet-pt);
|
|
108
|
+
|
|
109
|
+
// Tablet landscape
|
|
110
|
+
@include grid.col(10, tablet-ls);
|
|
111
|
+
@include grid.offset(1, tablet-ls);
|
|
112
|
+
|
|
113
|
+
// Desktop
|
|
114
|
+
@include grid.col(8, desktop);
|
|
115
|
+
@include grid.offset(2, desktop);
|
|
116
|
+
|
|
117
|
+
// Desktop large
|
|
118
|
+
@include grid.col(8, desktop-large);
|
|
119
|
+
@include grid.offset(2, desktop-large);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/*
|
|
124
|
+
Quote with an image regular with
|
|
125
|
+
Just the image
|
|
126
|
+
*/
|
|
127
|
+
%srl-quote-with-image-image-regular-width {
|
|
128
|
+
@if system.$build == "xbrl" {
|
|
129
|
+
@include grid.col(2);
|
|
130
|
+
@include grid.offset(3);
|
|
131
|
+
} @else if system.$build == "pdf" {
|
|
132
|
+
margin-left: grid.calculate-pdf-col-start(3);
|
|
133
|
+
margin-right: grid.get-gutter-column-gap();
|
|
134
|
+
width: grid.calculate-pdf-col-span-minus-one-gutter(2);
|
|
135
|
+
} @else {
|
|
136
|
+
// Mobile
|
|
137
|
+
@include grid.col(4);
|
|
138
|
+
|
|
139
|
+
// Mobile landscape
|
|
140
|
+
@include grid.col(4, phone-ls);
|
|
141
|
+
|
|
142
|
+
// Tablet portrait
|
|
143
|
+
@include grid.col(3, tablet-pt);
|
|
144
|
+
|
|
145
|
+
// Tablet landscape
|
|
146
|
+
@include grid.col(3, tablet-ls);
|
|
147
|
+
@include grid.offset(2, tablet-ls);
|
|
148
|
+
|
|
149
|
+
// Desktop
|
|
150
|
+
@include grid.col(2, desktop);
|
|
151
|
+
@include grid.offset(3, desktop);
|
|
152
|
+
|
|
153
|
+
// Desktop large
|
|
154
|
+
@include grid.col(2, desktop-large);
|
|
155
|
+
@include grid.offset(3, desktop-large);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
Quote with an image regular with
|
|
161
|
+
Just the text
|
|
162
|
+
*/
|
|
163
|
+
%srl-quote-with-image-text-regular-width {
|
|
164
|
+
@if system.$build == "xbrl" {
|
|
165
|
+
@include grid.col(4);
|
|
166
|
+
@include grid.offset(5);
|
|
167
|
+
} @else if system.$build == "pdf" {
|
|
168
|
+
width: grid.calculate-pdf-col-span-minus-one-gutter(4);
|
|
169
|
+
} @else {
|
|
170
|
+
// Mobile
|
|
171
|
+
@include grid.col(4);
|
|
172
|
+
|
|
173
|
+
// Mobile landscape
|
|
174
|
+
@include grid.col(4, phone-ls);
|
|
175
|
+
|
|
176
|
+
// Tablet portrait
|
|
177
|
+
@include grid.col(5, tablet-pt);
|
|
178
|
+
|
|
179
|
+
// Tablet landscape
|
|
180
|
+
@include grid.col(5, tablet-ls);
|
|
181
|
+
@include grid.offset(5, tablet-ls);
|
|
182
|
+
|
|
183
|
+
// Desktop
|
|
184
|
+
@include grid.col(4, desktop);
|
|
185
|
+
@include grid.offset(5, desktop);
|
|
186
|
+
|
|
187
|
+
// Desktop large
|
|
188
|
+
@include grid.col(4, desktop-large);
|
|
189
|
+
@include grid.offset(5, desktop-large);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
Quote with an image wide with
|
|
195
|
+
Just the image
|
|
196
|
+
*/
|
|
197
|
+
%srl-quote-with-image-image-wide-width {
|
|
198
|
+
@if system.$build == "xbrl" {
|
|
199
|
+
@include grid.col(2);
|
|
200
|
+
@include grid.offset(2);
|
|
201
|
+
} @else if system.$build == "pdf" {
|
|
202
|
+
margin-left: 0;
|
|
203
|
+
margin-right: 0;
|
|
204
|
+
@include grid.pdf-flex-col(2);
|
|
205
|
+
} @else {
|
|
206
|
+
// Mobile
|
|
207
|
+
@include grid.col(4);
|
|
208
|
+
|
|
209
|
+
// Mobile landscape
|
|
210
|
+
@include grid.col(4, phone-ls);
|
|
211
|
+
|
|
212
|
+
// Tablet portrait
|
|
213
|
+
@include grid.col(3, tablet-pt);
|
|
214
|
+
|
|
215
|
+
// Tablet landscape
|
|
216
|
+
@include grid.col(3, tablet-ls);
|
|
217
|
+
@include grid.offset(1, tablet-ls);
|
|
218
|
+
|
|
219
|
+
// Desktop
|
|
220
|
+
@include grid.col(2, desktop);
|
|
221
|
+
@include grid.offset(2, desktop);
|
|
222
|
+
|
|
223
|
+
// Desktop large
|
|
224
|
+
@include grid.col(2, desktop-large);
|
|
225
|
+
@include grid.offset(2, desktop-large);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/*
|
|
230
|
+
Quote with an image wide with
|
|
231
|
+
Just the text
|
|
232
|
+
*/
|
|
233
|
+
%srl-quote-with-image-text-wide-width {
|
|
234
|
+
@if system.$build == "xbrl" {
|
|
235
|
+
@include grid.col(6);
|
|
236
|
+
@include grid.offset(4);
|
|
237
|
+
} @else if system.$build == "pdf" {
|
|
238
|
+
@include grid.pdf-flex-col(6);
|
|
239
|
+
} @else {
|
|
240
|
+
// Mobile
|
|
241
|
+
@include grid.col(4);
|
|
242
|
+
|
|
243
|
+
// Mobile landscape
|
|
244
|
+
@include grid.col(4, phone-ls);
|
|
245
|
+
|
|
246
|
+
// Tablet portrait
|
|
247
|
+
@include grid.col(5, tablet-pt);
|
|
248
|
+
|
|
249
|
+
// Tablet landscape
|
|
250
|
+
@include grid.col(7, tablet-ls);
|
|
251
|
+
@include grid.offset(4, tablet-ls);
|
|
252
|
+
|
|
253
|
+
// Desktop
|
|
254
|
+
@include grid.col(6, desktop);
|
|
255
|
+
@include grid.offset(4, desktop);
|
|
256
|
+
|
|
257
|
+
// Desktop large
|
|
258
|
+
@include grid.col(6, desktop-large);
|
|
259
|
+
@include grid.offset(4, desktop-large);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/*
|
|
264
|
+
Aside width
|
|
265
|
+
*/
|
|
266
|
+
%srl-aside-width {
|
|
267
|
+
@if system.$build == "xbrl" {
|
|
268
|
+
@include grid.col(2);
|
|
269
|
+
@include grid.offset(1);
|
|
270
|
+
} @else if system.$build == "pdf" {
|
|
271
|
+
@include grid.pdf-flex-col(2);
|
|
272
|
+
} @else {
|
|
273
|
+
// Mobile
|
|
274
|
+
@include grid.col(4);
|
|
275
|
+
|
|
276
|
+
// Mobile landscape
|
|
277
|
+
@include grid.col(4, phone-ls);
|
|
278
|
+
|
|
279
|
+
// Tablet portrait
|
|
280
|
+
@include grid.col(8, tablet-pt);
|
|
281
|
+
|
|
282
|
+
// Tablet landscape
|
|
283
|
+
@include grid.col(2, tablet-ls);
|
|
284
|
+
|
|
285
|
+
// Desktop
|
|
286
|
+
@include grid.col(2, desktop);
|
|
287
|
+
@include grid.offset(1, desktop);
|
|
288
|
+
|
|
289
|
+
// Desktop large
|
|
290
|
+
@include grid.col(2, desktop-large);
|
|
291
|
+
@include grid.offset(1, desktop-large);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/*
|
|
296
|
+
Quote with an image regular with
|
|
297
|
+
Just the image
|
|
298
|
+
*/
|
|
299
|
+
%srl-cv-header-portrait {
|
|
300
|
+
@if system.$build == "xbrl" {
|
|
301
|
+
@include grid.col(2);
|
|
302
|
+
} @else if system.$build == "pdf" {
|
|
303
|
+
margin-right: grid.get-gutter-column-gap();
|
|
304
|
+
width: grid.calculate-pdf-col-span-minus-one-gutter(2);
|
|
305
|
+
} @else {
|
|
306
|
+
// Mobile
|
|
307
|
+
@include grid.col(4);
|
|
308
|
+
|
|
309
|
+
// Mobile landscape
|
|
310
|
+
@include grid.col(4, phone-ls);
|
|
311
|
+
|
|
312
|
+
// Tablet portrait
|
|
313
|
+
@include grid.col(3, tablet-pt);
|
|
314
|
+
|
|
315
|
+
// Tablet landscape
|
|
316
|
+
@include grid.col(3, tablet-ls);
|
|
317
|
+
|
|
318
|
+
// Desktop
|
|
319
|
+
@include grid.col(2, desktop);
|
|
320
|
+
|
|
321
|
+
// Desktop large
|
|
322
|
+
@include grid.col(2, desktop-large);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/*
|
|
327
|
+
Quote with an image regular with
|
|
328
|
+
Just the text
|
|
329
|
+
*/
|
|
330
|
+
%srl-cv-header-content {
|
|
331
|
+
@if system.$build == "xbrl" {
|
|
332
|
+
@include grid.col(4);
|
|
333
|
+
} @else if system.$build == "pdf" {
|
|
334
|
+
width: grid.calculate-pdf-col-span-minus-one-gutter(4);
|
|
335
|
+
} @else {
|
|
336
|
+
// Mobile
|
|
337
|
+
@include grid.col(4);
|
|
338
|
+
|
|
339
|
+
// Mobile landscape
|
|
340
|
+
@include grid.col(4, phone-ls);
|
|
341
|
+
|
|
342
|
+
// Tablet portrait
|
|
343
|
+
@include grid.col(5, tablet-pt);
|
|
344
|
+
|
|
345
|
+
// Tablet landscape
|
|
346
|
+
@include grid.col(5, tablet-ls);
|
|
347
|
+
|
|
348
|
+
// Desktop
|
|
349
|
+
@include grid.col(4, desktop);
|
|
350
|
+
|
|
351
|
+
// Desktop large
|
|
352
|
+
@include grid.col(4, desktop-large);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
@use "srl";
|
|
2
|
-
@use "placeholders";
|
|
3
2
|
@use "./components/note/accordion";
|
|
4
3
|
|
|
5
|
-
.srl-
|
|
6
|
-
|
|
4
|
+
@include srl.system-add-root-style('srl-header-height', srl.system-size-unit(68));
|
|
5
|
+
@include srl.system-add-root-style('srl-header-height', srl.system-size-unit(101), 'tablet-ls', 'up');
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
// Set inline background images for media queries
|
|
8
|
+
[style*="--medium-url"] {
|
|
9
|
+
background-image: var(--medium-url) !important;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.srl-wide-width & {
|
|
17
|
-
@extend %srl-wide-width;
|
|
12
|
+
@include srl.grid-media-up(tablet-pt) {
|
|
13
|
+
[style*="--large-url"] {
|
|
14
|
+
background-image: var(--large-url) !important;
|
|
18
15
|
}
|
|
16
|
+
}
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
@include srl.grid-media-up(desktop) {
|
|
19
|
+
[style*="--xlarge-url"] {
|
|
20
|
+
background-image: var(--xlarge-url) !important;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
@media (prefers-reduced-motion: reduce) {
|
|
25
|
+
* {
|
|
26
|
+
transition: none !important;
|
|
27
|
+
animation-name: none !important;
|
|
28
|
+
}
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
.srl-grid__content {
|
|
31
|
-
@extend %srl-trim-margins;
|
|
32
|
-
@extend %srl-regular-width;
|
|
33
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "srl";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, type VNode } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
label: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
type: 'button' | 'link' | 'submit';
|
|
8
|
+
callback: () => void;
|
|
9
|
+
img?: {
|
|
10
|
+
src: string
|
|
11
|
+
alt?: string
|
|
12
|
+
}
|
|
13
|
+
imgBefore?: {
|
|
14
|
+
src: string
|
|
15
|
+
alt?: string
|
|
16
|
+
}
|
|
17
|
+
imgAfter?: {
|
|
18
|
+
src: string
|
|
19
|
+
alt?: string
|
|
20
|
+
}
|
|
21
|
+
icon?: string
|
|
22
|
+
iconBefore?: string
|
|
23
|
+
iconAfter?: string
|
|
24
|
+
svg?: VNode | string;
|
|
25
|
+
svgBefore?: VNode | string;
|
|
26
|
+
svgAfter?: VNode | string;
|
|
27
|
+
}>();
|
|
28
|
+
|
|
29
|
+
const classes = computed(() => {
|
|
30
|
+
return {
|
|
31
|
+
'srl-button': true,
|
|
32
|
+
'srl-button--icon': props.icon || props.img || props.svg,
|
|
33
|
+
'srl-has-icon': props.iconBefore || props.iconAfter || props.imgBefore || props.imgAfter || props.svgBefore || props.svgAfter,
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const $el = ref<HTMLButtonElement>()
|
|
38
|
+
defineExpose({
|
|
39
|
+
$el
|
|
40
|
+
})
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<button
|
|
45
|
+
ref="$el"
|
|
46
|
+
type="button"
|
|
47
|
+
:title="props.title"
|
|
48
|
+
:aria-label="props.icon ? props.label : undefined"
|
|
49
|
+
:class="classes"
|
|
50
|
+
@click="props.callback()"
|
|
51
|
+
>
|
|
52
|
+
<ButtonDefaultContent
|
|
53
|
+
:label ="props.label"
|
|
54
|
+
:img="props.img"
|
|
55
|
+
:imgBefore="props.imgBefore"
|
|
56
|
+
:imgAfter="props.imgAfter"
|
|
57
|
+
:icon="props.icon"
|
|
58
|
+
:iconBefore="props.iconBefore"
|
|
59
|
+
:iconAfter="props.iconAfter"
|
|
60
|
+
:svg="props.svg"
|
|
61
|
+
:svgBefore="props.svgBefore"
|
|
62
|
+
:svgAfter="props.svgAfter"
|
|
63
|
+
/>
|
|
64
|
+
</button>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { h, ref, shallowRef, type VNode, watch } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
label: string;
|
|
6
|
+
img?: {
|
|
7
|
+
src: string
|
|
8
|
+
alt?: string
|
|
9
|
+
}
|
|
10
|
+
imgBefore?: {
|
|
11
|
+
src: string
|
|
12
|
+
alt?: string
|
|
13
|
+
}
|
|
14
|
+
imgAfter?: {
|
|
15
|
+
src: string
|
|
16
|
+
alt?: string
|
|
17
|
+
}
|
|
18
|
+
icon?: string
|
|
19
|
+
iconBefore?: string
|
|
20
|
+
iconAfter?: string
|
|
21
|
+
svg?: VNode | string
|
|
22
|
+
svgBefore?: VNode | string
|
|
23
|
+
svgAfter?: VNode | string
|
|
24
|
+
}>();
|
|
25
|
+
|
|
26
|
+
const svgVNode = shallowRef<VNode | null>(null)
|
|
27
|
+
const svgBeforeVNode = shallowRef<VNode | null>(null)
|
|
28
|
+
const svgAfterVNode = shallowRef<VNode | null>(null)
|
|
29
|
+
|
|
30
|
+
watch(
|
|
31
|
+
props,
|
|
32
|
+
async (to) => {
|
|
33
|
+
// Svg
|
|
34
|
+
if (typeof to.svg === 'object') {
|
|
35
|
+
svgVNode.value = to.svg
|
|
36
|
+
} else if (typeof to.svg === 'string') {
|
|
37
|
+
let icon = null
|
|
38
|
+
if (to.svg.startsWith('data:image/svg+xml,')) {
|
|
39
|
+
icon = decodeURIComponent(to.svg.replace('data:image/svg+xml,', ''))
|
|
40
|
+
} else if (!to.svg.startsWith('<svg')) {
|
|
41
|
+
try {
|
|
42
|
+
const res = await fetch(to.svg)
|
|
43
|
+
if (!res.ok) {
|
|
44
|
+
svgVNode.value = null
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
icon = await res.text()
|
|
48
|
+
} catch (e) {
|
|
49
|
+
svgVNode.value = null
|
|
50
|
+
return
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
icon = to.svg
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (!icon) {
|
|
57
|
+
svgVNode.value = null
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
const parser = new DOMParser()
|
|
61
|
+
const doc = parser.parseFromString(icon, 'image/svg+xml')
|
|
62
|
+
const svg = doc.querySelector('svg')
|
|
63
|
+
if (!svg) {
|
|
64
|
+
svgVNode.value = null
|
|
65
|
+
return
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const attrs = Object.fromEntries([...svg.attributes].map(attr => [attr.name, attr.value]))
|
|
69
|
+
|
|
70
|
+
svgVNode.value = h('svg', {
|
|
71
|
+
innerHTML: svg.innerHTML,
|
|
72
|
+
...attrs
|
|
73
|
+
})
|
|
74
|
+
} else {
|
|
75
|
+
svgVNode.value = null
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Svg Before
|
|
79
|
+
if (typeof to.svgBefore === 'object') {
|
|
80
|
+
svgBeforeVNode.value = to.svgBefore
|
|
81
|
+
} else if (typeof to.svgBefore === 'string') {
|
|
82
|
+
let icon = null
|
|
83
|
+
if (to.svgBefore.startsWith('data:image/svg+xml,')) {
|
|
84
|
+
icon = decodeURIComponent(to.svgBefore.replace('data:image/svg+xml,', ''))
|
|
85
|
+
} else if (!to.svgBefore.startsWith('<svg')) {
|
|
86
|
+
try {
|
|
87
|
+
const res = await fetch(to.svgBefore)
|
|
88
|
+
if (!res.ok) {
|
|
89
|
+
svgBeforeVNode.value = null
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
icon = await res.text()
|
|
93
|
+
} catch (e) {
|
|
94
|
+
svgBeforeVNode.value = null
|
|
95
|
+
return
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
icon = to.svgBefore
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!icon) {
|
|
102
|
+
svgBeforeVNode.value = null
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
const parser = new DOMParser()
|
|
106
|
+
const doc = parser.parseFromString(icon, 'image/svg+xml')
|
|
107
|
+
const svg = doc.querySelector('svg')
|
|
108
|
+
if (!svg) {
|
|
109
|
+
svgBeforeVNode.value = null
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const attrs = Object.fromEntries([...svg.attributes].map(attr => [attr.name, attr.value]))
|
|
114
|
+
|
|
115
|
+
svgBeforeVNode.value = h('svg', {
|
|
116
|
+
innerHTML: svg.innerHTML,
|
|
117
|
+
...attrs
|
|
118
|
+
})
|
|
119
|
+
} else {
|
|
120
|
+
svgBeforeVNode.value = null
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Svg After
|
|
124
|
+
if (typeof to.svgAfter === 'object') {
|
|
125
|
+
svgAfterVNode.value = to.svgAfter
|
|
126
|
+
} else if (typeof to.svgAfter === 'string') {
|
|
127
|
+
let icon = null
|
|
128
|
+
if (to.svgAfter.startsWith('data:image/svg+xml,')) {
|
|
129
|
+
icon = decodeURIComponent(to.svgAfter.replace('data:image/svg+xml,', ''))
|
|
130
|
+
} else if (!to.svgAfter.startsWith('<svg')) {
|
|
131
|
+
try {
|
|
132
|
+
const res = await fetch(to.svgAfter)
|
|
133
|
+
if (!res.ok) {
|
|
134
|
+
svgAfterVNode.value = null
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
icon = await res.text()
|
|
138
|
+
} catch (e) {
|
|
139
|
+
svgAfterVNode.value = null
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
} else {
|
|
143
|
+
icon = to.svgAfter
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (!icon) {
|
|
147
|
+
svgAfterVNode.value = null
|
|
148
|
+
return
|
|
149
|
+
}
|
|
150
|
+
const parser = new DOMParser()
|
|
151
|
+
const doc = parser.parseFromString(icon, 'image/svg+xml')
|
|
152
|
+
const svg = doc.querySelector('svg')
|
|
153
|
+
if (!svg) {
|
|
154
|
+
svgAfterVNode.value = null
|
|
155
|
+
return
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const attrs = Object.fromEntries([...svg.attributes].map(attr => [attr.name, attr.value]))
|
|
159
|
+
|
|
160
|
+
svgAfterVNode.value = h('svg', {
|
|
161
|
+
innerHTML: svg.innerHTML,
|
|
162
|
+
...attrs
|
|
163
|
+
})
|
|
164
|
+
} else {
|
|
165
|
+
svgAfterVNode.value = null
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{ immediate: true }
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
<template>
|
|
174
|
+
<template v-if="props.img">
|
|
175
|
+
<img :src="props.img.src" :alt="props.img.alt || props.label" />
|
|
176
|
+
</template>
|
|
177
|
+
<template v-else-if="props.imgBefore && props.imgAfter">
|
|
178
|
+
<img :src="props.imgBefore.src" :alt="props.imgBefore.alt ?? ''" aria-hidden="true" />
|
|
179
|
+
<span v-text="props.label" />
|
|
180
|
+
<img :src="props.imgAfter.src" :alt="props.imgAfter.alt ?? ''" aria-hidden="true" />
|
|
181
|
+
</template>
|
|
182
|
+
<template v-else-if="props.imgBefore">
|
|
183
|
+
<img :src="props.imgBefore.src" :alt="props.imgBefore.alt ?? ''" aria-hidden="true" />
|
|
184
|
+
<span v-text="props.label" />
|
|
185
|
+
</template>
|
|
186
|
+
<template v-else-if="props.imgAfter">
|
|
187
|
+
<span v-text="props.label" />
|
|
188
|
+
<img :src="props.imgAfter.src" :alt="props.imgAfter.alt ?? ''" aria-hidden="true" />
|
|
189
|
+
</template>
|
|
190
|
+
<template v-else-if="props.icon">
|
|
191
|
+
<i :class="`srl-icon srl-icon-${props.icon}`" />
|
|
192
|
+
</template>
|
|
193
|
+
<template v-else-if="props.iconBefore && props.iconAfter">
|
|
194
|
+
<i :class="`srl-icon srl-icon-${props.iconBefore}`" />
|
|
195
|
+
<span v-text="props.label" />
|
|
196
|
+
<i :class="`srl-icon srl-icon-${props.iconAfter}`" />
|
|
197
|
+
</template>
|
|
198
|
+
<template v-else-if="props.iconBefore">
|
|
199
|
+
<i :class="`srl-icon srl-icon-${props.iconBefore}`" />
|
|
200
|
+
<span v-text="props.label" />
|
|
201
|
+
</template>
|
|
202
|
+
<template v-else-if="props.iconAfter">
|
|
203
|
+
<span v-text="props.label" />
|
|
204
|
+
<i :class="`srl-icon srl-icon-${props.iconAfter}`" />
|
|
205
|
+
</template>
|
|
206
|
+
<template v-else-if="props.svg">
|
|
207
|
+
<component :is="svgVNode" v-if="svgVNode" :aria-label="props.label" />
|
|
208
|
+
</template>
|
|
209
|
+
<template v-else-if="props.svgBefore && props.svgAfter">
|
|
210
|
+
<component :is="svgBeforeVNode" v-if="svgBeforeVNode" aria-hidden="true" />
|
|
211
|
+
<span v-text="props.label" />
|
|
212
|
+
<component :is="svgAfterVNode" v-if="svgAfterVNode" aria-hidden="true" />
|
|
213
|
+
</template>
|
|
214
|
+
<template v-else-if="props.svgBefore">
|
|
215
|
+
<component :is="svgBeforeVNode" v-if="svgBeforeVNode" aria-hidden="true" />
|
|
216
|
+
<span v-text="props.label" />
|
|
217
|
+
</template>
|
|
218
|
+
<template v-else-if="props.svgAfter">
|
|
219
|
+
<span v-text="props.label" />
|
|
220
|
+
<component :is="svgAfterVNode" v-if="svgAfterVNode" aria-hidden="true" />
|
|
221
|
+
</template>
|
|
222
|
+
<template v-else>
|
|
223
|
+
<span v-text="props.label" />
|
|
224
|
+
</template>
|
|
225
|
+
</template>
|