@onsvisual/svelte-components 1.0.0-next.4 → 1.0.0-next.6

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.
Files changed (98) hide show
  1. package/dist/datavis/DataTile/DataTile.stories.svelte +28 -0
  2. package/dist/datavis/DataTile/DataTile.stories.svelte.d.ts +23 -0
  3. package/dist/datavis/DataTile/DataTile.svelte +56 -0
  4. package/dist/datavis/DataTile/DataTile.svelte.d.ts +37 -0
  5. package/dist/datavis/DataTile/docs/component.md +17 -0
  6. package/dist/datavis/Table/Table.svelte +6 -0
  7. package/dist/datavis/Table/Table.svelte.d.ts +2 -0
  8. package/dist/decorators/Divider/Divider.svelte +8 -3
  9. package/dist/decorators/Divider/Divider.svelte.d.ts +2 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/inputs/Button/Button.svelte +7 -2
  13. package/dist/inputs/Button/Button.svelte.d.ts +2 -0
  14. package/dist/inputs/Checkbox/Checkbox.svelte +48 -39
  15. package/dist/inputs/Checkbox/Checkbox.svelte.d.ts +8 -6
  16. package/dist/inputs/Checkboxes/Checkboxes.stories.svelte +7 -15
  17. package/dist/inputs/Checkboxes/Checkboxes.svelte +35 -11
  18. package/dist/inputs/Checkboxes/Checkboxes.svelte.d.ts +6 -0
  19. package/dist/inputs/Checkboxes/docs/component.md +1 -1
  20. package/dist/inputs/Dropdown/Dropdown.svelte +6 -1
  21. package/dist/inputs/Dropdown/Dropdown.svelte.d.ts +2 -0
  22. package/dist/inputs/ErrorPanel/ErrorPanel.svelte +6 -1
  23. package/dist/inputs/ErrorPanel/ErrorPanel.svelte.d.ts +2 -0
  24. package/dist/inputs/ErrorSummary/ErrorSummary.svelte +6 -1
  25. package/dist/inputs/ErrorSummary/ErrorSummary.svelte.d.ts +2 -0
  26. package/dist/inputs/Input/Input.svelte +6 -1
  27. package/dist/inputs/Input/Input.svelte.d.ts +2 -0
  28. package/dist/inputs/Radios/Radio.svelte +31 -22
  29. package/dist/inputs/Radios/Radio.svelte.d.ts +8 -6
  30. package/dist/inputs/Radios/Radios.svelte +35 -19
  31. package/dist/inputs/Radios/Radios.svelte.d.ts +8 -2
  32. package/dist/inputs/Radios/docs/component.md +2 -2
  33. package/dist/inputs/Select/Select.svelte +6 -1
  34. package/dist/inputs/Select/Select.svelte.d.ts +2 -0
  35. package/dist/inputs/Textarea/Textarea.svelte +6 -1
  36. package/dist/inputs/Textarea/Textarea.svelte.d.ts +2 -0
  37. package/dist/intro.mdx +9 -2
  38. package/dist/layout/Accordion/Accordion.svelte +1 -1
  39. package/dist/layout/Accordion/Accordion.svelte.d.ts +2 -2
  40. package/dist/layout/Breadcrumb/Breadcrumb.svelte +11 -1
  41. package/dist/layout/Breadcrumb/Breadcrumb.svelte.d.ts +4 -0
  42. package/dist/layout/Card/Card.svelte +1 -1
  43. package/dist/layout/Card/Card.svelte.d.ts +2 -2
  44. package/dist/layout/Contents/Contents.svelte +6 -1
  45. package/dist/layout/Contents/Contents.svelte.d.ts +2 -0
  46. package/dist/layout/DescriptionList/DescriptionList.svelte +6 -1
  47. package/dist/layout/DescriptionList/DescriptionList.svelte.d.ts +2 -0
  48. package/dist/layout/Details/Details.svelte +6 -1
  49. package/dist/layout/Details/Details.svelte.d.ts +2 -0
  50. package/dist/layout/DocumentList/DocumentList.svelte +6 -1
  51. package/dist/layout/DocumentList/DocumentList.svelte.d.ts +2 -0
  52. package/dist/layout/Footer/Footer.svelte +1 -1
  53. package/dist/layout/Footer/Footer.svelte.d.ts +4 -4
  54. package/dist/layout/Grid/Grid.svelte +3 -3
  55. package/dist/layout/Grid/Grid.svelte.d.ts +2 -2
  56. package/dist/layout/Header/Header.svelte +1 -1
  57. package/dist/layout/Header/Header.svelte.d.ts +4 -4
  58. package/dist/layout/Hero/Hero.stories.svelte +2 -1
  59. package/dist/layout/Hero/Hero.svelte +9 -8
  60. package/dist/layout/Hero/Hero.svelte.d.ts +8 -6
  61. package/dist/layout/Highlight/Highlight.svelte +15 -22
  62. package/dist/layout/Highlight/Highlight.svelte.d.ts +6 -6
  63. package/dist/layout/Image/Image.svelte +6 -1
  64. package/dist/layout/Image/Image.svelte.d.ts +2 -0
  65. package/dist/layout/List/List.svelte +6 -1
  66. package/dist/layout/List/List.svelte.d.ts +2 -0
  67. package/dist/layout/NavSections/NavSection.svelte +1 -1
  68. package/dist/layout/NavSections/NavSection.svelte.d.ts +2 -2
  69. package/dist/layout/NavSections/NavSections.svelte +3 -3
  70. package/dist/layout/NavSections/NavSections.svelte.d.ts +2 -2
  71. package/dist/layout/Notice/Notice.svelte +6 -1
  72. package/dist/layout/Notice/Notice.svelte.d.ts +2 -0
  73. package/dist/layout/PhaseBanner/PhaseBanner.svelte +6 -1
  74. package/dist/layout/PhaseBanner/PhaseBanner.svelte.d.ts +2 -0
  75. package/dist/layout/RelatedContent/RelatedContent.svelte +6 -1
  76. package/dist/layout/RelatedContent/RelatedContent.svelte.d.ts +2 -0
  77. package/dist/layout/Scroller/Scroller.svelte +6 -1
  78. package/dist/layout/Scroller/Scroller.svelte.d.ts +2 -0
  79. package/dist/layout/Scroller/ScrollerSection.svelte +6 -1
  80. package/dist/layout/Scroller/ScrollerSection.svelte.d.ts +2 -0
  81. package/dist/layout/Section/Section.svelte +3 -3
  82. package/dist/layout/Section/Section.svelte.d.ts +2 -2
  83. package/dist/layout/ShareButtons/ShareButtons.svelte +8 -3
  84. package/dist/layout/ShareButtons/ShareButtons.svelte.d.ts +2 -0
  85. package/dist/layout/Summary/Summary.svelte +6 -1
  86. package/dist/layout/Summary/Summary.svelte.d.ts +2 -0
  87. package/dist/layout/Tabs/Tabs.svelte +6 -1
  88. package/dist/layout/Tabs/Tabs.svelte.d.ts +2 -0
  89. package/dist/templates/intro.mdx +1 -1
  90. package/dist/wrappers/Container/Container.svelte +41 -28
  91. package/dist/wrappers/Container/Container.svelte.d.ts +8 -4
  92. package/dist/wrappers/Container/docs/component.md +4 -2
  93. package/dist/wrappers/Theme/Theme.svelte +4 -4
  94. package/dist/wrappers/Theme/Theme.svelte.d.ts +6 -6
  95. package/dist/wrappers/Theme/docs/component.md +1 -1
  96. package/dist/wrappers/Theme/themes.d.ts +28 -0
  97. package/dist/wrappers/Theme/themes.js +2 -1
  98. package/package.json +1 -1
@@ -5,9 +5,14 @@
5
5
  * @type {object[]|null}
6
6
  */
7
7
  export let items = null;
8
+ /**
9
+ * Optional: Set an additional CSS class for the component
10
+ * @type {string}
11
+ */
12
+ export let cls = "";
8
13
  </script>
9
14
 
10
- <ul class="ons-document-list">
15
+ <ul class="ons-document-list {cls}">
11
16
  <slot />
12
17
  {#if Array.isArray(items)}
13
18
  {#each items as item}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DocumentListEvents */
3
3
  /** @typedef {typeof __propDef.slots} DocumentListSlots */
4
4
  export default class DocumentList extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  items?: object[] | null | undefined;
6
7
  }, {
7
8
  [evt: string]: CustomEvent<any>;
@@ -15,6 +16,7 @@ export type DocumentListSlots = typeof __propDef.slots;
15
16
  import { SvelteComponentTyped } from "svelte";
16
17
  declare const __propDef: {
17
18
  props: {
19
+ cls?: string | undefined;
18
20
  items?: object[] | null | undefined;
19
21
  };
20
22
  events: {
@@ -11,7 +11,7 @@
11
11
  export let compact = false;
12
12
  /**
13
13
  * Sets a predefined theme
14
- * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|null}
14
+ * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|"grey"|null}
15
15
  */
16
16
  export let theme = null;
17
17
  /**
@@ -2,9 +2,9 @@
2
2
  /** @typedef {typeof __propDef.events} FooterEvents */
3
3
  /** @typedef {typeof __propDef.slots} FooterSlots */
4
4
  export default class Footer extends SvelteComponentTyped<{
5
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
6
- compact?: boolean | undefined;
5
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
7
6
  themeOverrides?: object | undefined;
7
+ compact?: boolean | undefined;
8
8
  }, {
9
9
  [evt: string]: CustomEvent<any>;
10
10
  }, {}> {
@@ -15,9 +15,9 @@ export type FooterSlots = typeof __propDef.slots;
15
15
  import { SvelteComponentTyped } from "svelte";
16
16
  declare const __propDef: {
17
17
  props: {
18
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
19
- compact?: boolean | undefined;
18
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
20
19
  themeOverrides?: object | undefined;
20
+ compact?: boolean | undefined;
21
21
  };
22
22
  events: {
23
23
  [evt: string]: CustomEvent<any>;
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export let id = "";
10
10
  /**
11
- * Optional: Set a CSS class for the component
11
+ * Optional: Set an additional CSS class for the component
12
12
  * @type {string}
13
13
  */
14
14
  export let cls = "";
@@ -33,12 +33,12 @@
33
33
  */
34
34
  export let caption = "";
35
35
  /**
36
- * Optional margin above section
36
+ * Adds margin above section
37
37
  * @type {boolean}
38
38
  */
39
39
  export let marginTop = false;
40
40
  /**
41
- * Optional margin below section
41
+ * Adds margin below section
42
42
  * @type {boolean}
43
43
  */
44
44
  export let marginBottom = true;
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} GridEvents */
3
3
  /** @typedef {typeof __propDef.slots} GridSlots */
4
4
  export default class Grid extends SvelteComponentTyped<{
5
- id?: string | undefined;
6
5
  cls?: string | undefined;
6
+ id?: string | undefined;
7
7
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
8
8
  marginTop?: boolean | undefined;
9
9
  marginBottom?: boolean | undefined;
@@ -26,8 +26,8 @@ export type GridSlots = typeof __propDef.slots;
26
26
  import { SvelteComponentTyped } from "svelte";
27
27
  declare const __propDef: {
28
28
  props: {
29
- id?: string | undefined;
30
29
  cls?: string | undefined;
30
+ id?: string | undefined;
31
31
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
32
32
  marginTop?: boolean | undefined;
33
33
  marginBottom?: boolean | undefined;
@@ -22,7 +22,7 @@
22
22
  export let titleHref = "";
23
23
  /**
24
24
  * Sets a predefined theme
25
- * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|null}
25
+ * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|"grey"|null}
26
26
  */
27
27
  export let theme = null;
28
28
  /**
@@ -2,11 +2,11 @@
2
2
  /** @typedef {typeof __propDef.events} HeaderEvents */
3
3
  /** @typedef {typeof __propDef.slots} HeaderSlots */
4
4
  export default class Header extends SvelteComponentTyped<{
5
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
6
+ themeOverrides?: object | undefined;
5
7
  title?: string | undefined;
6
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
7
8
  compact?: boolean | undefined;
8
9
  skipHref?: string | undefined;
9
- themeOverrides?: object | undefined;
10
10
  titleHref?: string | undefined;
11
11
  bilingual?: boolean | undefined;
12
12
  }, {
@@ -21,11 +21,11 @@ export type HeaderSlots = typeof __propDef.slots;
21
21
  import { SvelteComponentTyped } from "svelte";
22
22
  declare const __propDef: {
23
23
  props: {
24
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
25
+ themeOverrides?: object | undefined;
24
26
  title?: string | undefined;
25
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
26
27
  compact?: boolean | undefined;
27
28
  skipHref?: string | undefined;
28
- themeOverrides?: object | undefined;
29
29
  titleHref?: string | undefined;
30
30
  bilingual?: boolean | undefined;
31
31
  };
@@ -30,7 +30,8 @@
30
30
  width: "narrow",
31
31
  title: "Page title",
32
32
  lede: lipsum(1),
33
- actionButton: { label: "Get started", href: "#0" }
33
+ actionButton: { label: "Get started", href: "#0" },
34
+ theme: "paleblue"
34
35
  }}
35
36
  {template}
36
37
  />
@@ -55,11 +55,16 @@
55
55
  * @type {number|string|null}
56
56
  */
57
57
  export let height = null;
58
+ /**
59
+ * Optional: Set an additional CSS class for the component
60
+ * @type {string}
61
+ */
62
+ export let cls = "";
58
63
  /**
59
64
  * Sets a predefined theme
60
- * @type {"default"|"light"|"dark"|"blue"|"paleblue"|"navyblue"|"grey"|null}
65
+ * @type {"light"|"dark"|"blue"|"paleblue"|"navyblue"|"grey"|null}
61
66
  */
62
- export let theme = "default";
67
+ export let theme = null;
63
68
  /**
64
69
  * Define additional props to override the base theme
65
70
  * @type {object}
@@ -72,13 +77,9 @@
72
77
  export let background = null;
73
78
  </script>
74
79
 
75
- <Theme
76
- theme={theme === "light" ? "light" : theme === "dark" ? "dark" : null}
77
- overrides={themeOverrides}
78
- {background}
79
- >
80
+ <Theme theme={theme === "blue" ? null : theme} overrides={themeOverrides} {background}>
80
81
  <section
81
- class="ons-hero"
82
+ class="ons-hero {cls}"
82
83
  class:ons-hero--pale-blue={theme === "paleblue"}
83
84
  class:ons-hero--navy-blue={theme === "navyblue"}
84
85
  class:ons-hero--dark={theme === "blue"}
@@ -2,13 +2,14 @@
2
2
  /** @typedef {typeof __propDef.events} HeroEvents */
3
3
  /** @typedef {typeof __propDef.slots} HeroSlots */
4
4
  export default class Hero extends SvelteComponentTyped<{
5
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
6
+ background?: string | null | undefined;
7
+ cls?: string | undefined;
5
8
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
6
9
  height?: string | number | null | undefined;
7
- background?: string | null | undefined;
10
+ themeOverrides?: object | undefined;
8
11
  meta?: object[] | null | undefined;
9
12
  title?: string | undefined;
10
- theme?: "default" | "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
11
- themeOverrides?: object | undefined;
12
13
  pageType?: string | undefined;
13
14
  lede?: string | undefined;
14
15
  titleBadge?: object | null | undefined;
@@ -29,13 +30,14 @@ export type HeroSlots = typeof __propDef.slots;
29
30
  import { SvelteComponentTyped } from "svelte";
30
31
  declare const __propDef: {
31
32
  props: {
33
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
34
+ background?: string | null | undefined;
35
+ cls?: string | undefined;
32
36
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
33
37
  height?: string | number | null | undefined;
34
- background?: string | null | undefined;
38
+ themeOverrides?: object | undefined;
35
39
  meta?: object[] | null | undefined;
36
40
  title?: string | undefined;
37
- theme?: "default" | "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
38
- themeOverrides?: object | undefined;
39
41
  pageType?: string | undefined;
40
42
  lede?: string | undefined;
41
43
  titleBadge?: object | null | undefined;
@@ -1,5 +1,4 @@
1
1
  <script>
2
- import Theme from "../../wrappers/Theme/Theme.svelte";
3
2
  import Container from "../../wrappers/Container/Container.svelte";
4
3
 
5
4
  /**
@@ -8,7 +7,7 @@
8
7
  */
9
8
  export let id = "";
10
9
  /**
11
- * Optional: Set a CSS class for the section
10
+ * Optional: Set an additional CSS class for the section
12
11
  * @type {string}
13
12
  */
14
13
  export let cls = "";
@@ -29,7 +28,7 @@
29
28
  export let height = null;
30
29
  /**
31
30
  * Sets a predefined theme
32
- * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|null}
31
+ * @type {"light"|"dark"|"paleblue"|"blue"|"navyblue"|"grey"|null}
33
32
  */
34
33
  export let theme = "paleblue";
35
34
  /**
@@ -43,34 +42,28 @@
43
42
  */
44
43
  export let background = null;
45
44
  /**
46
- * Optional margin above section
45
+ * Adds margin above section
47
46
  * @type {boolean}
48
47
  */
49
48
  export let marginTop = false;
50
49
  /**
51
- * Optional margin below section
50
+ * Adds margin below section
52
51
  * @type {boolean}
53
52
  */
54
53
  export let marginBottom = true;
55
54
  </script>
56
55
 
57
- <Theme {theme} overrides={themeOverrides} {background}>
58
- <Container {id} {cls} {width} {marginTop} {marginBottom}>
59
- <section
60
- class="ons-section__highlight ons-u-mt-xl ons-u-mb-xl"
61
- class:ons-u-fs-l={bigText}
62
- style:height={typeof height === "number"
63
- ? `${height}px`
64
- : height === "full"
65
- ? "100vh"
66
- : height}
67
- >
68
- <div>
69
- <slot />
70
- </div>
71
- </section>
72
- </Container>
73
- </Theme>
56
+ <Container {id} {cls} {width} {marginTop} {marginBottom} {theme} {themeOverrides} {background}>
57
+ <section
58
+ class="ons-section__highlight ons-u-mt-xl ons-u-mb-xl"
59
+ class:ons-u-fs-l={bigText}
60
+ style:height={typeof height === "number" ? `${height}px` : height === "full" ? "100vh" : height}
61
+ >
62
+ <div>
63
+ <slot />
64
+ </div>
65
+ </section>
66
+ </Container>
74
67
 
75
68
  <style>
76
69
  .ons-section__highlight {
@@ -2,14 +2,14 @@
2
2
  /** @typedef {typeof __propDef.events} HighlightEvents */
3
3
  /** @typedef {typeof __propDef.slots} HighlightSlots */
4
4
  export default class Highlight extends SvelteComponentTyped<{
5
- id?: string | undefined;
5
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
6
+ background?: string | null | undefined;
6
7
  cls?: string | undefined;
8
+ id?: string | undefined;
7
9
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
8
10
  height?: string | number | null | undefined;
9
11
  marginTop?: boolean | undefined;
10
12
  marginBottom?: boolean | undefined;
11
- background?: string | null | undefined;
12
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
13
13
  themeOverrides?: object | undefined;
14
14
  bigText?: boolean | undefined;
15
15
  }, {
@@ -24,14 +24,14 @@ export type HighlightSlots = typeof __propDef.slots;
24
24
  import { SvelteComponentTyped } from "svelte";
25
25
  declare const __propDef: {
26
26
  props: {
27
- id?: string | undefined;
27
+ theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | "grey" | null | undefined;
28
+ background?: string | null | undefined;
28
29
  cls?: string | undefined;
30
+ id?: string | undefined;
29
31
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
30
32
  height?: string | number | null | undefined;
31
33
  marginTop?: boolean | undefined;
32
34
  marginBottom?: boolean | undefined;
33
- background?: string | null | undefined;
34
- theme?: "light" | "dark" | "paleblue" | "blue" | "navyblue" | null | undefined;
35
35
  themeOverrides?: object | undefined;
36
36
  bigText?: boolean | undefined;
37
37
  };
@@ -14,9 +14,14 @@
14
14
  * @type {string}
15
15
  */
16
16
  export let caption = "";
17
+ /**
18
+ * Optional: Set an additional CSS class for the component
19
+ * @type {string}
20
+ */
21
+ export let cls = "";
17
22
  </script>
18
23
 
19
- <figure class="ons-image">
24
+ <figure class="ons-image {cls}">
20
25
  <img class="ons-image__img" {src} {alt} />
21
26
  {#if caption}
22
27
  <figcaption class="ons-image__caption">{caption}</figcaption>
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ImageEvents */
3
3
  /** @typedef {typeof __propDef.slots} ImageSlots */
4
4
  export default class Image extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  caption?: string | undefined;
6
7
  src?: string | undefined;
7
8
  alt?: string | undefined;
@@ -15,6 +16,7 @@ export type ImageSlots = typeof __propDef.slots;
15
16
  import { SvelteComponentTyped } from "svelte";
16
17
  declare const __propDef: {
17
18
  props: {
19
+ cls?: string | undefined;
18
20
  caption?: string | undefined;
19
21
  src?: string | undefined;
20
22
  alt?: string | undefined;
@@ -11,10 +11,15 @@
11
11
  * @type {string[]|null}
12
12
  */
13
13
  export let items = null;
14
+ /**
15
+ * Optional: Set an additional CSS class for the component
16
+ * @type {string}
17
+ */
18
+ export let cls = "";
14
19
  </script>
15
20
 
16
21
  {#if mode === "number"}
17
- <ol class="ons-list">
22
+ <ol class="ons-list {cls}">
18
23
  <slot>
19
24
  {#if items}
20
25
  {#each items as item}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ListEvents */
3
3
  /** @typedef {typeof __propDef.slots} ListSlots */
4
4
  export default class List extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  mode?: "number" | "inline" | "bullet" | "dash" | "bare" | undefined;
6
7
  items?: string[] | null | undefined;
7
8
  }, {
@@ -16,6 +17,7 @@ export type ListSlots = typeof __propDef.slots;
16
17
  import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
20
+ cls?: string | undefined;
19
21
  mode?: "number" | "inline" | "bullet" | "dash" | "bare" | undefined;
20
22
  items?: string[] | null | undefined;
21
23
  };
@@ -14,7 +14,7 @@
14
14
  */
15
15
  export let id = slugify(title);
16
16
  /**
17
- * Optional: Set a CSS class for the section
17
+ * Optional: Set an additional CSS class for the section
18
18
  * @type {string}
19
19
  */
20
20
  export let cls = "";
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} NavSectionEvents */
3
3
  /** @typedef {typeof __propDef.slots} NavSectionSlots */
4
4
  export default class NavSection extends SvelteComponentTyped<{
5
- id?: string | undefined;
6
5
  cls?: string | undefined;
6
+ id?: string | undefined;
7
7
  title?: string | undefined;
8
8
  hideTitle?: boolean | undefined;
9
9
  subsection?: boolean | undefined;
@@ -19,8 +19,8 @@ export type NavSectionSlots = typeof __propDef.slots;
19
19
  import { SvelteComponentTyped } from "svelte";
20
20
  declare const __propDef: {
21
21
  props: {
22
- id?: string | undefined;
23
22
  cls?: string | undefined;
23
+ id?: string | undefined;
24
24
  title?: string | undefined;
25
25
  hideTitle?: boolean | undefined;
26
26
  subsection?: boolean | undefined;
@@ -9,7 +9,7 @@
9
9
  */
10
10
  export let id = "toc";
11
11
  /**
12
- * Optional: Set a CSS class for the section
12
+ * Optional: Set an additional CSS class for the section
13
13
  * @type {string}
14
14
  */
15
15
  export let cls = "";
@@ -29,12 +29,12 @@
29
29
  */
30
30
  export let noContents = false;
31
31
  /**
32
- * Optional margin above section
32
+ * Adds margin above section
33
33
  * @type {boolean}
34
34
  */
35
35
  export let marginTop = false;
36
36
  /**
37
- * Optional margin below section
37
+ * Adds margin below section
38
38
  * @type {boolean}
39
39
  */
40
40
  export let marginBottom = true;
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} NavSectionsEvents */
3
3
  /** @typedef {typeof __propDef.slots} NavSectionsSlots */
4
4
  export default class NavSections extends SvelteComponentTyped<{
5
- id?: string | undefined;
6
5
  cls?: string | undefined;
6
+ id?: string | undefined;
7
7
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
8
8
  marginTop?: boolean | undefined;
9
9
  marginBottom?: boolean | undefined;
@@ -26,8 +26,8 @@ export type NavSectionsSlots = typeof __propDef.slots;
26
26
  import { SvelteComponentTyped } from "svelte";
27
27
  declare const __propDef: {
28
28
  props: {
29
- id?: string | undefined;
30
29
  cls?: string | undefined;
30
+ id?: string | undefined;
31
31
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
32
32
  marginTop?: boolean | undefined;
33
33
  marginBottom?: boolean | undefined;
@@ -4,10 +4,15 @@
4
4
  * @type {"info"|"success"|"error"|"warning"}
5
5
  */
6
6
  export let mode = "info";
7
+ /**
8
+ * Optional: Set an additional CSS class for the component
9
+ * @type {string}
10
+ */
11
+ export let cls = "";
7
12
  </script>
8
13
 
9
14
  <div
10
- class="ons-panel ons-panel--no-title"
15
+ class="ons-panel ons-panel--no-title {cls}"
11
16
  class:ons-panel--info={mode === "info"}
12
17
  class:ons-panel--warn={mode === "warning"}
13
18
  class:ons-panel--error={mode === "error"}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} NoticeEvents */
3
3
  /** @typedef {typeof __propDef.slots} NoticeSlots */
4
4
  export default class Notice extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  mode?: "error" | "info" | "success" | "warning" | undefined;
6
7
  }, {
7
8
  [evt: string]: CustomEvent<any>;
@@ -15,6 +16,7 @@ export type NoticeSlots = typeof __propDef.slots;
15
16
  import { SvelteComponentTyped } from "svelte";
16
17
  declare const __propDef: {
17
18
  props: {
19
+ cls?: string | undefined;
18
20
  mode?: "error" | "info" | "success" | "warning" | undefined;
19
21
  };
20
22
  events: {
@@ -9,9 +9,14 @@
9
9
  * @type {string}
10
10
  */
11
11
  export let href = "https://www.ons.gov.uk/feedback";
12
+ /**
13
+ * Optional: Set an additional CSS class for the component
14
+ * @type {string}
15
+ */
16
+ export let cls = "";
12
17
  </script>
13
18
 
14
- <div class="ons-phase-banner">
19
+ <div class="ons-phase-banner {cls}">
15
20
  <div class="ons-container">
16
21
  <div
17
22
  class="ons-grid ons-grid-flex ons-grid--gutterless ons-grid-flex--vertical-center ons-grid-flex--no-wrap"
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} PhaseBannerEvents */
3
3
  /** @typedef {typeof __propDef.slots} PhaseBannerSlots */
4
4
  export default class PhaseBanner extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  href?: string | undefined;
6
7
  phase?: string | undefined;
7
8
  }, {
@@ -14,6 +15,7 @@ export type PhaseBannerSlots = typeof __propDef.slots;
14
15
  import { SvelteComponentTyped } from "svelte";
15
16
  declare const __propDef: {
16
17
  props: {
18
+ cls?: string | undefined;
17
19
  href?: string | undefined;
18
20
  phase?: string | undefined;
19
21
  };
@@ -14,9 +14,14 @@
14
14
  * @type {object[]}
15
15
  */
16
16
  export let related = [{ title, links }];
17
+ /**
18
+ * Optional: Set an additional CSS class for the component
19
+ * @type {string}
20
+ */
21
+ export let cls = "";
17
22
  </script>
18
23
 
19
- <aside class="ons-related-content" aria-label="Related content">
24
+ <aside class="ons-related-content {cls}" aria-label="Related content">
20
25
  <slot />
21
26
  {#each related as section}
22
27
  <div class="ons-related-content__section">
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} RelatedContentEvents */
3
3
  /** @typedef {typeof __propDef.slots} RelatedContentSlots */
4
4
  export default class RelatedContent extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  title?: string | undefined;
6
7
  links?: object | object[] | undefined;
7
8
  related?: object[] | undefined;
@@ -17,6 +18,7 @@ export type RelatedContentSlots = typeof __propDef.slots;
17
18
  import { SvelteComponentTyped } from "svelte";
18
19
  declare const __propDef: {
19
20
  props: {
21
+ cls?: string | undefined;
20
22
  title?: string | undefined;
21
23
  links?: object | object[] | undefined;
22
24
  related?: object[] | undefined;
@@ -136,6 +136,11 @@
136
136
  * @type {boolean}
137
137
  */
138
138
  export let visible = false;
139
+ /**
140
+ * Optional: Set an additional CSS class for the component
141
+ * @type {string}
142
+ */
143
+ export let cls = "";
139
144
 
140
145
  const sections = writable([]);
141
146
  setContext("sections", sections);
@@ -251,7 +256,7 @@
251
256
  <div class="ons-u-mt-xl"></div>
252
257
  {/if}
253
258
 
254
- <svelte-scroller-outer {id} bind:this={outer} class:splitscreen>
259
+ <svelte-scroller-outer {id} bind:this={outer} class={cls} class:splitscreen>
255
260
  <svelte-scroller-background-container class="background-container" style="{style}{widthStyle}">
256
261
  <svelte-scroller-background bind:this={background}>
257
262
  <slot name="background" />
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ScrollerEvents */
3
3
  /** @typedef {typeof __propDef.slots} ScrollerSlots */
4
4
  export default class Scroller extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  marginTop?: boolean | undefined;
7
8
  marginBottom?: boolean | undefined;
@@ -30,6 +31,7 @@ export type ScrollerSlots = typeof __propDef.slots;
30
31
  import { SvelteComponentTyped } from "svelte";
31
32
  declare const __propDef: {
32
33
  props: {
34
+ cls?: string | undefined;
33
35
  id?: string | undefined;
34
36
  marginTop?: boolean | undefined;
35
37
  marginBottom?: boolean | undefined;
@@ -17,6 +17,11 @@
17
17
  * @type {boolean}
18
18
  */
19
19
  export let hideTitle = false;
20
+ /**
21
+ * Optional: Set an additional CSS class for the component
22
+ * @type {string}
23
+ */
24
+ export let cls = "";
20
25
 
21
26
  let section;
22
27
 
@@ -35,7 +40,7 @@
35
40
  });
36
41
  </script>
37
42
 
38
- <section data-id={id} bind:this={section}>
43
+ <section data-id={id} bind:this={section} class={cls}>
39
44
  <Container width="narrow">
40
45
  <div class="ons-scroller-section">
41
46
  {#if title}