@onsvisual/svelte-components 0.0.24 → 0.0.25
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/@types/decorators/Divider/Divider.svelte.d.ts +2 -2
- package/dist/@types/layout/AnalyticsBanner/AnalyticsBanner.svelte.d.ts +2 -2
- package/dist/@types/layout/Breadcrumb/Breadcrumb.svelte.d.ts +2 -2
- package/dist/@types/layout/Cards/Cards.svelte.d.ts +2 -2
- package/dist/@types/layout/Grid/Grid.svelte.d.ts +2 -2
- package/dist/@types/layout/Hero/Hero.svelte.d.ts +2 -2
- package/dist/@types/layout/Highlight/Highlight.svelte.d.ts +2 -2
- package/dist/@types/layout/NavSections/NavSections.svelte.d.ts +16 -2
- package/dist/@types/layout/Section/Section.svelte.d.ts +2 -2
- package/dist/@types/layout/ShareButtons/ShareButtons.svelte.d.ts +2 -2
- package/dist/@types/wrappers/Container/Container.svelte.d.ts +2 -2
- package/dist/decorators/Divider/Divider.svelte +2 -2
- package/dist/layout/AnalyticsBanner/AnalyticsBanner.svelte +5 -5
- package/dist/layout/Breadcrumb/Breadcrumb.svelte +2 -2
- package/dist/layout/Cards/Cards.svelte +2 -2
- package/dist/layout/Grid/Grid.svelte +2 -2
- package/dist/layout/Hero/Hero.svelte +2 -2
- package/dist/layout/Highlight/Highlight.svelte +2 -2
- package/dist/layout/NavSections/NavSections.svelte +64 -8
- package/dist/layout/Section/Section.svelte +1 -1
- package/dist/layout/ShareButtons/ShareButtons.svelte +1 -1
- package/dist/wrappers/Container/Container.svelte +14 -7
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/** @typedef {typeof __propDef.slots} DividerSlots */
|
|
4
4
|
export default class Divider extends SvelteComponentTyped<{
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
6
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
7
7
|
marginTop?: boolean;
|
|
8
8
|
marginBottom?: boolean;
|
|
9
9
|
themeOverrides?: any;
|
|
@@ -19,7 +19,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
19
19
|
declare const __propDef: {
|
|
20
20
|
props: {
|
|
21
21
|
theme?: "light" | "dark" | "lightblue";
|
|
22
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
22
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
23
23
|
marginTop?: boolean;
|
|
24
24
|
marginBottom?: boolean;
|
|
25
25
|
themeOverrides?: object;
|
|
@@ -3,7 +3,7 @@ export function analyticsEvent(props: any): void;
|
|
|
3
3
|
/** @typedef {typeof __propDef.events} AnalyticsBannerEvents */
|
|
4
4
|
/** @typedef {typeof __propDef.slots} AnalyticsBannerSlots */
|
|
5
5
|
export default class AnalyticsBanner extends SvelteComponentTyped<{
|
|
6
|
-
width?: "
|
|
6
|
+
width?: "wide" | "wider";
|
|
7
7
|
analyticsId?: string;
|
|
8
8
|
analyticsProps?: any;
|
|
9
9
|
usageCookies?: boolean;
|
|
@@ -17,7 +17,7 @@ export type AnalyticsBannerSlots = typeof __propDef.slots;
|
|
|
17
17
|
import { SvelteComponentTyped } from "svelte";
|
|
18
18
|
declare const __propDef: {
|
|
19
19
|
props: {
|
|
20
|
-
width?: "
|
|
20
|
+
width?: "wide" | "wider";
|
|
21
21
|
analyticsId?: string;
|
|
22
22
|
analyticsProps?: object;
|
|
23
23
|
usageCookies?: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export default class Breadcrumb extends SvelteComponentTyped<{
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
6
|
background?: string;
|
|
7
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
7
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
8
8
|
themeOverrides?: any;
|
|
9
9
|
links?: any[];
|
|
10
10
|
}, {
|
|
@@ -19,7 +19,7 @@ declare const __propDef: {
|
|
|
19
19
|
props: {
|
|
20
20
|
theme?: "light" | "dark" | "lightblue";
|
|
21
21
|
background?: string;
|
|
22
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
22
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
23
23
|
themeOverrides?: object;
|
|
24
24
|
links?: any[];
|
|
25
25
|
};
|
|
@@ -5,7 +5,7 @@ export default class Cards extends SvelteComponentTyped<{
|
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
6
|
id?: string;
|
|
7
7
|
cls?: string;
|
|
8
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
8
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
9
9
|
height?: string | number;
|
|
10
10
|
marginTop?: boolean;
|
|
11
11
|
marginBottom?: boolean;
|
|
@@ -30,7 +30,7 @@ declare const __propDef: {
|
|
|
30
30
|
theme?: "light" | "dark" | "lightblue";
|
|
31
31
|
id?: string;
|
|
32
32
|
cls?: string;
|
|
33
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
33
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
34
34
|
height?: number | string;
|
|
35
35
|
marginTop?: boolean;
|
|
36
36
|
marginBottom?: boolean;
|
|
@@ -5,7 +5,7 @@ export default class Grid extends SvelteComponentTyped<{
|
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
6
|
id?: string;
|
|
7
7
|
cls?: string;
|
|
8
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
8
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
9
9
|
height?: string | number;
|
|
10
10
|
marginTop?: boolean;
|
|
11
11
|
marginBottom?: boolean;
|
|
@@ -30,7 +30,7 @@ declare const __propDef: {
|
|
|
30
30
|
theme?: "light" | "dark" | "lightblue";
|
|
31
31
|
id?: string;
|
|
32
32
|
cls?: string;
|
|
33
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
33
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
34
34
|
height?: number | string;
|
|
35
35
|
marginTop?: boolean;
|
|
36
36
|
marginBottom?: boolean;
|
|
@@ -6,7 +6,7 @@ export default class Hero extends SvelteComponentTyped<{
|
|
|
6
6
|
id?: string;
|
|
7
7
|
cls?: string;
|
|
8
8
|
background?: string;
|
|
9
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
9
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
10
10
|
height?: "full" | "auto" | "tall";
|
|
11
11
|
themeOverrides?: any;
|
|
12
12
|
title?: string;
|
|
@@ -28,7 +28,7 @@ declare const __propDef: {
|
|
|
28
28
|
id?: string;
|
|
29
29
|
cls?: string;
|
|
30
30
|
background?: string;
|
|
31
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
31
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
32
32
|
height?: "auto" | "tall" | "full";
|
|
33
33
|
themeOverrides?: object;
|
|
34
34
|
title?: string;
|
|
@@ -5,7 +5,7 @@ export default class Highlight extends SvelteComponentTyped<{
|
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
6
|
id?: string;
|
|
7
7
|
background?: string;
|
|
8
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
8
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
9
9
|
height?: "full" | "auto" | "tall";
|
|
10
10
|
marginTop?: boolean;
|
|
11
11
|
marginBottom?: boolean;
|
|
@@ -25,7 +25,7 @@ declare const __propDef: {
|
|
|
25
25
|
theme?: "light" | "dark" | "lightblue";
|
|
26
26
|
id?: string;
|
|
27
27
|
background?: string;
|
|
28
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
28
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
29
29
|
height?: "auto" | "tall" | "full";
|
|
30
30
|
marginTop?: boolean;
|
|
31
31
|
marginBottom?: boolean;
|
|
@@ -2,7 +2,14 @@
|
|
|
2
2
|
/** @typedef {typeof __propDef.events} NavSectionsEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} NavSectionsSlots */
|
|
4
4
|
export default class NavSections extends SvelteComponentTyped<{
|
|
5
|
-
|
|
5
|
+
theme?: "light" | "dark" | "lightblue";
|
|
6
|
+
id?: string;
|
|
7
|
+
cls?: string;
|
|
8
|
+
background?: string;
|
|
9
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
10
|
+
marginTop?: boolean;
|
|
11
|
+
marginBottom?: boolean;
|
|
12
|
+
themeOverrides?: any;
|
|
6
13
|
contentsLabel?: string;
|
|
7
14
|
noContents?: boolean;
|
|
8
15
|
}, {
|
|
@@ -23,7 +30,14 @@ export type NavSectionsSlots = typeof __propDef.slots;
|
|
|
23
30
|
import { SvelteComponentTyped } from "svelte";
|
|
24
31
|
declare const __propDef: {
|
|
25
32
|
props: {
|
|
26
|
-
|
|
33
|
+
theme?: "light" | "dark" | "lightblue";
|
|
34
|
+
id?: string;
|
|
35
|
+
cls?: string;
|
|
36
|
+
background?: string;
|
|
37
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
38
|
+
marginTop?: boolean;
|
|
39
|
+
marginBottom?: boolean;
|
|
40
|
+
themeOverrides?: object;
|
|
27
41
|
contentsLabel?: string;
|
|
28
42
|
noContents?: boolean;
|
|
29
43
|
};
|
|
@@ -6,7 +6,7 @@ export default class Section extends SvelteComponentTyped<{
|
|
|
6
6
|
id?: string;
|
|
7
7
|
cls?: string;
|
|
8
8
|
background?: string;
|
|
9
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
9
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
10
10
|
marginTop?: boolean;
|
|
11
11
|
marginBottom?: boolean;
|
|
12
12
|
themeOverrides?: any;
|
|
@@ -28,7 +28,7 @@ declare const __propDef: {
|
|
|
28
28
|
id?: string;
|
|
29
29
|
cls?: string;
|
|
30
30
|
background?: string;
|
|
31
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
31
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
32
32
|
marginTop?: boolean;
|
|
33
33
|
marginBottom?: boolean;
|
|
34
34
|
themeOverrides?: object;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/** @typedef {typeof __propDef.slots} ShareButtonsSlots */
|
|
4
4
|
export default class ShareButtons extends SvelteComponentTyped<{
|
|
5
5
|
theme?: "light" | "dark" | "lightblue";
|
|
6
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
6
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
7
7
|
marginTop?: boolean;
|
|
8
8
|
marginBottom?: boolean;
|
|
9
9
|
themeOverrides?: any;
|
|
@@ -19,7 +19,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
19
19
|
declare const __propDef: {
|
|
20
20
|
props: {
|
|
21
21
|
theme?: "light" | "dark" | "lightblue";
|
|
22
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
22
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
23
23
|
marginTop?: boolean;
|
|
24
24
|
marginBottom?: boolean;
|
|
25
25
|
themeOverrides?: object;
|
|
@@ -6,7 +6,7 @@ export default class Container extends SvelteComponentTyped<{
|
|
|
6
6
|
id?: string;
|
|
7
7
|
cls?: string;
|
|
8
8
|
background?: string;
|
|
9
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
9
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
10
10
|
height?: "full" | "auto" | "tall";
|
|
11
11
|
marginTop?: boolean;
|
|
12
12
|
marginBottom?: boolean;
|
|
@@ -27,7 +27,7 @@ declare const __propDef: {
|
|
|
27
27
|
id?: string;
|
|
28
28
|
cls?: string;
|
|
29
29
|
background?: string;
|
|
30
|
-
width?: "narrow" | "medium" | "wide" | "full";
|
|
30
|
+
width?: "narrow" | "medium" | "wide" | "wider" | "full";
|
|
31
31
|
height?: "auto" | "tall" | "full";
|
|
32
32
|
marginTop?: boolean;
|
|
33
33
|
marginBottom?: boolean;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
export let hr = "narrow";
|
|
9
9
|
/**
|
|
10
10
|
* Sets the width of the container
|
|
11
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
11
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
12
12
|
*/
|
|
13
|
-
export let width = "
|
|
13
|
+
export let width = "wide";
|
|
14
14
|
/**
|
|
15
15
|
* Sets a predefined theme
|
|
16
16
|
* @type {"light"|"dark"|"lightblue"}
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
export let usageCookies = false;
|
|
27
27
|
/**
|
|
28
28
|
* Set the width of the banner
|
|
29
|
-
* @type {"
|
|
29
|
+
* @type {"wide"|"wider"}
|
|
30
30
|
*/
|
|
31
|
-
export let width = "
|
|
31
|
+
export let width = "wide";
|
|
32
32
|
|
|
33
33
|
let live; // Don't run analytics unless page is live on ONS site (re-set in the onMount function)
|
|
34
34
|
let showBanner = false;
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
>
|
|
164
164
|
<div
|
|
165
165
|
class="ons-container ons-cookies-banner__primary"
|
|
166
|
-
class:ons-page__container--
|
|
166
|
+
class:ons-page__container--wider="{width === 'wider'}"
|
|
167
167
|
>
|
|
168
168
|
<div class="ons-grid">
|
|
169
169
|
<div class="ons-grid__col ons-col-8@m">
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
{:else}
|
|
218
218
|
<div
|
|
219
219
|
class="ons-container ons-cookies-banner__confirmation"
|
|
220
|
-
class:ons-page__container--
|
|
220
|
+
class:ons-page__container--wider="{width === 'wider'}"
|
|
221
221
|
>
|
|
222
222
|
<div
|
|
223
223
|
class="ons-grid ons-grid--flex ons-grid--between ons-grid--gutterless ons-grid--no-wrap@s ons-grid--vertical-center"
|
|
@@ -251,6 +251,6 @@
|
|
|
251
251
|
/* padding: 0; */
|
|
252
252
|
background: none !important;
|
|
253
253
|
}
|
|
254
|
-
.ons-page__container--
|
|
254
|
+
.ons-page__container--wider {
|
|
255
255
|
max-width: 1240px;
|
|
256
256
|
}</style>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
export let links = [];
|
|
9
9
|
/**
|
|
10
10
|
* Sets the width of the container
|
|
11
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
11
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
12
12
|
*/
|
|
13
|
-
export let width = "
|
|
13
|
+
export let width = "wide";
|
|
14
14
|
/**
|
|
15
15
|
* Sets a predefined theme
|
|
16
16
|
* @type {"light"|"dark"|"lightblue"}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
export let cls = "ons-cards";
|
|
15
15
|
/**
|
|
16
16
|
* Sets the width of the section
|
|
17
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
17
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
18
18
|
*/
|
|
19
|
-
export let width = "
|
|
19
|
+
export let width = "wide";
|
|
20
20
|
/**
|
|
21
21
|
* Sets the title of the section
|
|
22
22
|
* @type {string}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
export let cls = null;
|
|
14
14
|
/**
|
|
15
15
|
* Sets the width of the section
|
|
16
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
16
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
17
17
|
*/
|
|
18
|
-
export let width = "
|
|
18
|
+
export let width = "wide";
|
|
19
19
|
/**
|
|
20
20
|
* Sets the title of the section
|
|
21
21
|
* @type {string}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
export let cls = null;
|
|
15
15
|
/**
|
|
16
16
|
* Sets the width of the section
|
|
17
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
17
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
18
18
|
*/
|
|
19
|
-
export let width = "
|
|
19
|
+
export let width = "wide";
|
|
20
20
|
/**
|
|
21
21
|
* Sets the minimum height of the section
|
|
22
22
|
* @type {"auto"|"tall"|"full"}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
export let id = null;
|
|
9
9
|
/**
|
|
10
10
|
* Sets the width of the section
|
|
11
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
11
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
12
12
|
*/
|
|
13
|
-
export let width = "
|
|
13
|
+
export let width = "medium";
|
|
14
14
|
/**
|
|
15
15
|
* Sets the minimum height of the section
|
|
16
16
|
* @type {"auto"|"tall"|"full"}
|
|
@@ -1,26 +1,62 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { onMount, setContext } from "svelte";
|
|
3
3
|
import { writable } from "svelte/store";
|
|
4
|
+
import Container from "../../wrappers/Container/Container.svelte";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* ID for back-linking to table of contents
|
|
7
8
|
* @type {string}
|
|
8
9
|
*/
|
|
9
|
-
export let
|
|
10
|
+
export let id = "toc";
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* (Optional) Sets a css class for the section
|
|
12
13
|
* @type {string}
|
|
13
14
|
*/
|
|
14
|
-
export let
|
|
15
|
+
export let cls = null;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the width of the container
|
|
18
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
19
|
+
*/
|
|
20
|
+
export let width = "wide";
|
|
21
|
+
/**
|
|
22
|
+
* A label for the page contents nav
|
|
23
|
+
* @type {string}
|
|
24
|
+
*/
|
|
25
|
+
export let contentsLabel = "Page contents";
|
|
15
26
|
/**
|
|
16
27
|
* Don't include table of contents (allows for custom uses of nav panel)
|
|
17
28
|
* @type {boolean}
|
|
18
29
|
*/
|
|
19
30
|
export let noContents = false;
|
|
31
|
+
/**
|
|
32
|
+
* Sets a predefined theme
|
|
33
|
+
* @type {"light"|"dark"|"lightblue"}
|
|
34
|
+
*/
|
|
35
|
+
export let theme = null;
|
|
36
|
+
/**
|
|
37
|
+
* Define additional props to override the base theme
|
|
38
|
+
* @type {object}
|
|
39
|
+
*/
|
|
40
|
+
export let themeOverrides = null;
|
|
41
|
+
/**
|
|
42
|
+
* Overrides the background CSS for the section
|
|
43
|
+
* @type {string}
|
|
44
|
+
*/
|
|
45
|
+
export let background = null;
|
|
46
|
+
/**
|
|
47
|
+
* Optional margin above section
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
*/
|
|
50
|
+
export let marginTop = false;
|
|
51
|
+
/**
|
|
52
|
+
* Optional margin below section
|
|
53
|
+
* @type {boolean}
|
|
54
|
+
*/
|
|
55
|
+
export let marginBottom = true;
|
|
20
56
|
|
|
21
57
|
let active;
|
|
22
58
|
|
|
23
|
-
setContext("tocId",
|
|
59
|
+
setContext("tocId", id);
|
|
24
60
|
|
|
25
61
|
const sections = writable([]);
|
|
26
62
|
setContext("sections", sections);
|
|
@@ -49,10 +85,18 @@
|
|
|
49
85
|
});
|
|
50
86
|
</script>
|
|
51
87
|
|
|
52
|
-
<
|
|
88
|
+
<Container
|
|
89
|
+
cls="{cls}"
|
|
90
|
+
theme="{theme}"
|
|
91
|
+
themeOverrides="{themeOverrides}"
|
|
92
|
+
width="{width}"
|
|
93
|
+
marginTop="{marginTop}"
|
|
94
|
+
marginBottom="{marginBottom}"
|
|
95
|
+
background="{background}"
|
|
96
|
+
>
|
|
53
97
|
<div class="ons-grid ons-js-toc-container ons-u-ml-no">
|
|
54
98
|
<slot name="header" />
|
|
55
|
-
<div class="ons-grid__col ons-col-4@m ons-u-pl-no ons-grid__col--sticky@m" id="{
|
|
99
|
+
<div class="ons-grid__col ons-col-4@m ons-u-pl-no ons-grid__col--sticky@m" id="{id}">
|
|
56
100
|
<aside class="ons-toc-container" role="complementary">
|
|
57
101
|
<nav class="ons-toc" aria-label="Pages in this guide">
|
|
58
102
|
<slot name="before-nav" />
|
|
@@ -89,4 +133,16 @@
|
|
|
89
133
|
</div>
|
|
90
134
|
<slot name="footer" />
|
|
91
135
|
</div>
|
|
92
|
-
</
|
|
136
|
+
</Container>
|
|
137
|
+
|
|
138
|
+
<style>
|
|
139
|
+
@media (min-width: 740px) {
|
|
140
|
+
.ons-col-4\@m {
|
|
141
|
+
max-width: 280px;
|
|
142
|
+
width: 280px;
|
|
143
|
+
}
|
|
144
|
+
.ons-col-8\@m {
|
|
145
|
+
max-width: calc(100% - 280px);
|
|
146
|
+
width: calc(100% - 280px);
|
|
147
|
+
}
|
|
148
|
+
}</style>
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
export let cls = null;
|
|
14
14
|
/**
|
|
15
15
|
* Sets the width of the container
|
|
16
|
-
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
16
|
+
* @type {"narrow"|"medium"|"wide"|"wider"|"full"}
|
|
17
17
|
*/
|
|
18
|
-
export let width = "
|
|
18
|
+
export let width = "wide";
|
|
19
19
|
/**
|
|
20
20
|
* Sets the minimum height of the container relative to the height of the viewport
|
|
21
21
|
* @type {"auto"|"tall"|"full"}
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
$: _cls = cls && !(theme || background) ? cls : "";
|
|
52
52
|
</script>
|
|
53
53
|
|
|
54
|
-
{#if
|
|
54
|
+
{#if ["narrow", "medium"].includes(width)}
|
|
55
55
|
<Theme
|
|
56
56
|
id="{id}"
|
|
57
57
|
cls="{cls}"
|
|
@@ -66,7 +66,10 @@
|
|
|
66
66
|
class:ons-page__container--full-height="{height === 'full'}"
|
|
67
67
|
>
|
|
68
68
|
{#if marginTop}<div class="ons-spacer"></div>{/if}
|
|
69
|
-
<div
|
|
69
|
+
<div
|
|
70
|
+
class:ons-page__container--narrow="{width === 'narrow'}"
|
|
71
|
+
class:ons-page__container--medium="{width === 'medium'}"
|
|
72
|
+
>
|
|
70
73
|
<slot />
|
|
71
74
|
</div>
|
|
72
75
|
{#if marginBottom}<div class="ons-spacer"></div>{/if}
|
|
@@ -83,7 +86,7 @@
|
|
|
83
86
|
<div
|
|
84
87
|
id="{_id}"
|
|
85
88
|
class="ons-page__container ons-container {_cls}"
|
|
86
|
-
class:ons-page__container--
|
|
89
|
+
class:ons-page__container--wider="{width === 'wider'}"
|
|
87
90
|
class:ons-page__container--full="{width === 'full'}"
|
|
88
91
|
class:ons-page__container--tall-height="{height === 'tall'}"
|
|
89
92
|
class:ons-page__container--full-height="{height === 'full'}"
|
|
@@ -102,10 +105,14 @@
|
|
|
102
105
|
padding-bottom: 0.05px;
|
|
103
106
|
}
|
|
104
107
|
.ons-page__container--narrow {
|
|
105
|
-
max-width:
|
|
108
|
+
max-width: 608px;
|
|
106
109
|
margin: 0 auto 0 0;
|
|
107
110
|
}
|
|
108
|
-
.ons-page__container--
|
|
111
|
+
.ons-page__container--medium {
|
|
112
|
+
max-width: 800px;
|
|
113
|
+
margin: 0 auto 0 0;
|
|
114
|
+
}
|
|
115
|
+
.ons-page__container--wider {
|
|
109
116
|
max-width: 1240px;
|
|
110
117
|
}
|
|
111
118
|
.ons-page__container--full {
|