@onsvisual/svelte-components 1.0.0-next.5 → 1.0.0-next.7

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 (95) hide show
  1. package/dist/datavis/DataTile/DataTile.stories.svelte +14 -0
  2. package/dist/datavis/DataTile/DataTile.svelte +23 -4
  3. package/dist/datavis/DataTile/DataTile.svelte.d.ts +4 -0
  4. package/dist/datavis/DataTile/Sparkline.svelte +117 -0
  5. package/dist/datavis/DataTile/Sparkline.svelte.d.ts +27 -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/decorators/Icon/Icon.stories.svelte +25 -0
  11. package/dist/{inputs/Button/Icon.svelte.d.ts → decorators/Icon/Icon.stories.svelte.d.ts} +2 -6
  12. package/dist/{inputs/Button → decorators/Icon}/Icon.svelte +20 -3
  13. package/dist/decorators/Icon/Icon.svelte.d.ts +29 -0
  14. package/dist/decorators/Icon/docs/component.md +12 -0
  15. package/dist/inputs/Button/Button.svelte +9 -4
  16. package/dist/inputs/Button/Button.svelte.d.ts +6 -4
  17. package/dist/inputs/Checkbox/Checkbox.svelte +6 -1
  18. package/dist/inputs/Checkbox/Checkbox.svelte.d.ts +2 -0
  19. package/dist/inputs/Checkboxes/Checkboxes.svelte +6 -1
  20. package/dist/inputs/Checkboxes/Checkboxes.svelte.d.ts +2 -0
  21. package/dist/inputs/Dropdown/Dropdown.svelte +6 -1
  22. package/dist/inputs/Dropdown/Dropdown.svelte.d.ts +2 -0
  23. package/dist/inputs/ErrorPanel/ErrorPanel.svelte +6 -1
  24. package/dist/inputs/ErrorPanel/ErrorPanel.svelte.d.ts +2 -0
  25. package/dist/inputs/ErrorSummary/ErrorSummary.svelte +6 -1
  26. package/dist/inputs/ErrorSummary/ErrorSummary.svelte.d.ts +2 -0
  27. package/dist/inputs/Input/Input.svelte +6 -1
  28. package/dist/inputs/Input/Input.svelte.d.ts +2 -0
  29. package/dist/inputs/Radios/Radios.svelte +6 -1
  30. package/dist/inputs/Radios/Radios.svelte.d.ts +2 -0
  31. package/dist/inputs/Select/Select.svelte +6 -1
  32. package/dist/inputs/Select/Select.svelte.d.ts +2 -0
  33. package/dist/inputs/Textarea/Textarea.svelte +6 -1
  34. package/dist/inputs/Textarea/Textarea.svelte.d.ts +2 -0
  35. package/dist/layout/Accordion/Accordion.svelte +1 -1
  36. package/dist/layout/Accordion/Accordion.svelte.d.ts +2 -2
  37. package/dist/layout/Breadcrumb/Breadcrumb.svelte +6 -1
  38. package/dist/layout/Breadcrumb/Breadcrumb.svelte.d.ts +4 -2
  39. package/dist/layout/Card/Card.svelte +1 -1
  40. package/dist/layout/Card/Card.svelte.d.ts +2 -2
  41. package/dist/layout/Contents/Contents.svelte +6 -1
  42. package/dist/layout/Contents/Contents.svelte.d.ts +2 -0
  43. package/dist/layout/DescriptionList/DescriptionList.svelte +6 -1
  44. package/dist/layout/DescriptionList/DescriptionList.svelte.d.ts +2 -0
  45. package/dist/layout/Details/Details.svelte +6 -1
  46. package/dist/layout/Details/Details.svelte.d.ts +2 -0
  47. package/dist/layout/DocumentList/DocumentList.svelte +6 -1
  48. package/dist/layout/DocumentList/DocumentList.svelte.d.ts +2 -0
  49. package/dist/layout/Footer/Footer.svelte +1 -1
  50. package/dist/layout/Footer/Footer.svelte.d.ts +4 -4
  51. package/dist/layout/Grid/Grid.svelte +3 -3
  52. package/dist/layout/Grid/Grid.svelte.d.ts +2 -2
  53. package/dist/layout/Header/Header.svelte +1 -1
  54. package/dist/layout/Header/Header.svelte.d.ts +4 -4
  55. package/dist/layout/Hero/Hero.stories.svelte +2 -1
  56. package/dist/layout/Hero/Hero.svelte +9 -8
  57. package/dist/layout/Hero/Hero.svelte.d.ts +8 -6
  58. package/dist/layout/Highlight/Highlight.svelte +15 -22
  59. package/dist/layout/Highlight/Highlight.svelte.d.ts +6 -6
  60. package/dist/layout/Image/Image.svelte +6 -1
  61. package/dist/layout/Image/Image.svelte.d.ts +2 -0
  62. package/dist/layout/List/List.svelte +6 -1
  63. package/dist/layout/List/List.svelte.d.ts +2 -0
  64. package/dist/layout/NavSections/NavSection.svelte +1 -1
  65. package/dist/layout/NavSections/NavSection.svelte.d.ts +2 -2
  66. package/dist/layout/NavSections/NavSections.svelte +3 -3
  67. package/dist/layout/NavSections/NavSections.svelte.d.ts +2 -2
  68. package/dist/layout/Notice/Notice.svelte +6 -1
  69. package/dist/layout/Notice/Notice.svelte.d.ts +2 -0
  70. package/dist/layout/PhaseBanner/PhaseBanner.svelte +6 -1
  71. package/dist/layout/PhaseBanner/PhaseBanner.svelte.d.ts +2 -0
  72. package/dist/layout/RelatedContent/RelatedContent.svelte +6 -1
  73. package/dist/layout/RelatedContent/RelatedContent.svelte.d.ts +2 -0
  74. package/dist/layout/Scroller/Scroller.svelte +6 -1
  75. package/dist/layout/Scroller/Scroller.svelte.d.ts +2 -0
  76. package/dist/layout/Scroller/ScrollerSection.svelte +6 -1
  77. package/dist/layout/Scroller/ScrollerSection.svelte.d.ts +2 -0
  78. package/dist/layout/Section/Section.svelte +3 -3
  79. package/dist/layout/Section/Section.svelte.d.ts +2 -2
  80. package/dist/layout/ShareButtons/ShareButtons.svelte +8 -3
  81. package/dist/layout/ShareButtons/ShareButtons.svelte.d.ts +2 -0
  82. package/dist/layout/Summary/Summary.svelte +6 -1
  83. package/dist/layout/Summary/Summary.svelte.d.ts +2 -0
  84. package/dist/layout/Tabs/Tabs.svelte +6 -1
  85. package/dist/layout/Tabs/Tabs.svelte.d.ts +2 -0
  86. package/dist/templates/intro.mdx +1 -1
  87. package/dist/wrappers/Container/Container.svelte +41 -28
  88. package/dist/wrappers/Container/Container.svelte.d.ts +8 -4
  89. package/dist/wrappers/Container/docs/component.md +4 -2
  90. package/dist/wrappers/Theme/Theme.svelte +4 -4
  91. package/dist/wrappers/Theme/Theme.svelte.d.ts +6 -6
  92. package/dist/wrappers/Theme/docs/component.md +1 -1
  93. package/dist/wrappers/Theme/themes.d.ts +28 -0
  94. package/dist/wrappers/Theme/themes.js +2 -1
  95. package/package.json +3 -1
@@ -4,9 +4,14 @@
4
4
  * @type {string}
5
5
  */
6
6
  export let message = "";
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
- <div class="ons-panel ons-panel--error ons-panel--no-title" id="number-of-employees-error">
14
+ <div class="ons-panel ons-panel--error ons-panel--no-title {cls}" id="number-of-employees-error">
10
15
  <span class="ons-panel__assistive-text ons-u-vh">Error: </span>
11
16
  <div class="ons-panel__body">
12
17
  {#if message}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ErrorPanelEvents */
3
3
  /** @typedef {typeof __propDef.slots} ErrorPanelSlots */
4
4
  export default class ErrorPanel extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  message?: string | undefined;
6
7
  }, {
7
8
  [evt: string]: CustomEvent<any>;
@@ -15,6 +16,7 @@ export type ErrorPanelSlots = typeof __propDef.slots;
15
16
  import { SvelteComponentTyped } from "svelte";
16
17
  declare const __propDef: {
17
18
  props: {
19
+ cls?: string | undefined;
18
20
  message?: string | undefined;
19
21
  };
20
22
  events: {
@@ -11,9 +11,14 @@
11
11
  * @type {object[]}
12
12
  */
13
13
  export let items = [];
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
- <div aria-labelledby="alert" role="alert" tabindex="-1" class="ons-panel ons-panel--error">
21
+ <div aria-labelledby="alert" role="alert" tabindex="-1" class="ons-panel ons-panel--error {cls}">
17
22
  <div class="ons-panel__header">
18
23
  <h2 id="alert" data-qa="error-header" class="ons-panel__title ons-u-fs-r--b">{title}</h2>
19
24
  </div>
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ErrorSummaryEvents */
3
3
  /** @typedef {typeof __propDef.slots} ErrorSummarySlots */
4
4
  export default class ErrorSummary extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  title?: string | undefined;
6
7
  items?: object[] | undefined;
7
8
  }, {
@@ -16,6 +17,7 @@ export type ErrorSummarySlots = typeof __propDef.slots;
16
17
  import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
20
+ cls?: string | undefined;
19
21
  title?: string | undefined;
20
22
  items?: object[] | undefined;
21
23
  };
@@ -68,9 +68,14 @@
68
68
  * @type {boolean}
69
69
  */
70
70
  export let error = false;
71
+ /**
72
+ * Optional: Set an additional CSS class for the component
73
+ * @type {string}
74
+ */
75
+ export let cls = "";
71
76
  </script>
72
77
 
73
- <div class="ons-field">
78
+ <div class="ons-field {cls}">
74
79
  {#if label}
75
80
  <label
76
81
  class="ons-label"
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} InputEvents */
3
3
  /** @typedef {typeof __propDef.slots} InputSlots */
4
4
  export default class Input extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  width?: number | undefined;
7
8
  label?: string | undefined;
@@ -27,6 +28,7 @@ export type InputSlots = typeof __propDef.slots;
27
28
  import { SvelteComponentTyped } from "svelte";
28
29
  declare const __propDef: {
29
30
  props: {
31
+ cls?: string | undefined;
30
32
  id?: string | undefined;
31
33
  width?: number | undefined;
32
34
  label?: string | undefined;
@@ -35,9 +35,14 @@
35
35
  * @type {boolean}
36
36
  */
37
37
  export let compact = false;
38
+ /**
39
+ * Optional: Set an additional CSS class for the component
40
+ * @type {string}
41
+ */
42
+ export let cls = "";
38
43
  </script>
39
44
 
40
- <fieldset class="ons-fieldset">
45
+ <fieldset class="ons-fieldset {cls}">
41
46
  {#if title}
42
47
  <legend class="ons-fieldset__legend ons-u-mb-no">
43
48
  <span class="ons-fieldset__legend-title ons-u-pb-no" class:ons-u-vh={hideTitle}>{title}</span>
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} RadiosEvents */
3
3
  /** @typedef {typeof __propDef.slots} RadiosSlots */
4
4
  export default class Radios extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  label?: string | undefined;
7
8
  title?: string | undefined;
@@ -23,6 +24,7 @@ export type RadiosSlots = typeof __propDef.slots;
23
24
  import { SvelteComponentTyped } from "svelte";
24
25
  declare const __propDef: {
25
26
  props: {
27
+ cls?: string | undefined;
26
28
  id?: string | undefined;
27
29
  label?: string | undefined;
28
30
  title?: string | undefined;
@@ -108,6 +108,11 @@
108
108
  hideMenu = false;
109
109
  dispatch("clear", value);
110
110
  }
111
+ /**
112
+ * Optional: Set an additional CSS class for the component
113
+ * @type {string}
114
+ */
115
+ export let cls = "";
111
116
 
112
117
  function inputValueTemplate(result) {
113
118
  return result && result[labelKey];
@@ -183,7 +188,7 @@
183
188
  <script src={scriptUrl} on:load={handleScriptLoad}></script>
184
189
  </svelte:head>
185
190
 
186
- <div class="ons-field">
191
+ <div class="ons-field {cls}">
187
192
  {#if label}<label for={id} class="ons-label" class:ons-u-vh={hideLabel}>{label}</label>{/if}
188
193
  <div class="ons-autocomplete-wrapper">
189
194
  {#if scriptLoaded}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} SelectEvents */
3
3
  /** @typedef {typeof __propDef.slots} SelectSlots */
4
4
  export default class Select extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  label?: string | undefined;
7
8
  mode?: "default" | "search" | undefined;
@@ -31,6 +32,7 @@ export type SelectSlots = typeof __propDef.slots;
31
32
  import { SvelteComponentTyped } from "svelte";
32
33
  declare const __propDef: {
33
34
  props: {
35
+ cls?: string | undefined;
34
36
  id?: string | undefined;
35
37
  label?: string | undefined;
36
38
  mode?: "default" | "search" | undefined;
@@ -43,11 +43,16 @@
43
43
  * @type {number}
44
44
  */
45
45
  export let width = 30;
46
+ /**
47
+ * Optional: Set an additional CSS class for the component
48
+ * @type {string}
49
+ */
50
+ export let cls = "";
46
51
 
47
52
  $: remaining = charLimit && value.length ? charLimit - value.length : charLimit || null;
48
53
  </script>
49
54
 
50
- <div class="ons-field">
55
+ <div class="ons-field {cls}">
51
56
  {#if label}
52
57
  <label
53
58
  class="ons-label ons-label--with-description"
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} TextareaEvents */
3
3
  /** @typedef {typeof __propDef.slots} TextareaSlots */
4
4
  export default class Textarea extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  width?: number | undefined;
7
8
  label?: string | undefined;
@@ -20,6 +21,7 @@ export type TextareaSlots = typeof __propDef.slots;
20
21
  import { SvelteComponentTyped } from "svelte";
21
22
  declare const __propDef: {
22
23
  props: {
24
+ cls?: string | undefined;
23
25
  id?: string | undefined;
24
26
  width?: number | undefined;
25
27
  label?: string | undefined;
@@ -10,7 +10,7 @@
10
10
  */
11
11
  export let id = slugify();
12
12
  /**
13
- * Optional: Set a CSS class for the component
13
+ * Optional: Set an additional CSS class for the component
14
14
  * @type {string}
15
15
  */
16
16
  export let cls = "";
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} AccordionEvents */
3
3
  /** @typedef {typeof __propDef.slots} AccordionSlots */
4
4
  export default class Accordion extends SvelteComponentTyped<{
5
- id?: string | undefined;
6
5
  cls?: string | undefined;
6
+ id?: string | undefined;
7
7
  showToggle?: boolean | undefined;
8
8
  }, {
9
9
  [evt: string]: CustomEvent<any>;
@@ -17,8 +17,8 @@ export type AccordionSlots = typeof __propDef.slots;
17
17
  import { SvelteComponentTyped } from "svelte";
18
18
  declare const __propDef: {
19
19
  props: {
20
- id?: string | undefined;
21
20
  cls?: string | undefined;
21
+ id?: string | undefined;
22
22
  showToggle?: boolean | undefined;
23
23
  };
24
24
  events: {
@@ -16,6 +16,11 @@
16
16
  * @type {"narrow"|"medium"|"wide"|"wider"|"full"}
17
17
  */
18
18
  export let width = "wide";
19
+ /**
20
+ * Optional: Set an additional CSS class for the component
21
+ * @type {string}
22
+ */
23
+ export let cls = "";
19
24
  /**
20
25
  * Overrides the base theme background (accepts any valid CSS background value)
21
26
  * @type {string|null}
@@ -23,7 +28,7 @@
23
28
  export let background = null;
24
29
  </script>
25
30
 
26
- <Container {width} {background}>
31
+ <Container {width} {background} {cls}>
27
32
  <nav class="ons-breadcrumbs" aria-label="Breadcrumbs">
28
33
  <ol class="ons-breadcrumbs__items ons-u-fs-s">
29
34
  {#each backHref ? [{ label: "Back", href: backHref }] : links as link}
@@ -2,8 +2,9 @@
2
2
  /** @typedef {typeof __propDef.events} BreadcrumbEvents */
3
3
  /** @typedef {typeof __propDef.slots} BreadcrumbSlots */
4
4
  export default class Breadcrumb extends SvelteComponentTyped<{
5
- width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
6
5
  background?: string | null | undefined;
6
+ cls?: string | undefined;
7
+ width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
7
8
  links?: object[] | undefined;
8
9
  backHref?: string | undefined;
9
10
  }, {
@@ -16,8 +17,9 @@ export type BreadcrumbSlots = typeof __propDef.slots;
16
17
  import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
19
- width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
20
20
  background?: string | null | undefined;
21
+ cls?: string | undefined;
22
+ width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
21
23
  links?: object[] | undefined;
22
24
  backHref?: string | undefined;
23
25
  };
@@ -7,7 +7,7 @@
7
7
  */
8
8
  export let id = "";
9
9
  /**
10
- * Optional: Set a CSS class for the section
10
+ * Optional: Set an additional CSS class for the section
11
11
  * @type {string}
12
12
  */
13
13
  export let cls = "";
@@ -2,8 +2,8 @@
2
2
  /** @typedef {typeof __propDef.events} CardEvents */
3
3
  /** @typedef {typeof __propDef.slots} CardSlots */
4
4
  export default class Card extends SvelteComponentTyped<{
5
- id?: string | undefined;
6
5
  cls?: string | undefined;
6
+ id?: string | undefined;
7
7
  title?: string | undefined;
8
8
  image?: string | undefined;
9
9
  headingTag?: "h2" | "h3" | undefined;
@@ -27,8 +27,8 @@ export type CardSlots = typeof __propDef.slots;
27
27
  import { SvelteComponentTyped } from "svelte";
28
28
  declare const __propDef: {
29
29
  props: {
30
- id?: string | undefined;
31
30
  cls?: string | undefined;
31
+ id?: string | undefined;
32
32
  title?: string | undefined;
33
33
  image?: string | undefined;
34
34
  headingTag?: "h2" | "h3" | undefined;
@@ -19,9 +19,14 @@
19
19
  * @type {string}
20
20
  */
21
21
  export let skipHref = "";
22
+ /**
23
+ * Optional: Set an additional CSS class for the component
24
+ * @type {string}
25
+ */
26
+ export let cls = "";
22
27
  </script>
23
28
 
24
- <aside class="ons-table-of-contents-container" role="complementary">
29
+ <aside class="ons-table-of-contents-container {cls}" role="complementary">
25
30
  {#if skipHref}
26
31
  <a class="ons-skip-to-content" href="#0">Skip to guide content</a>
27
32
  {/if}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ContentsEvents */
3
3
  /** @typedef {typeof __propDef.slots} ContentsSlots */
4
4
  export default class Contents extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  title?: string | undefined;
6
7
  links?: object[] | undefined;
7
8
  hideTitle?: boolean | undefined;
@@ -16,6 +17,7 @@ export type ContentsSlots = typeof __propDef.slots;
16
17
  import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
20
+ cls?: string | undefined;
19
21
  title?: string | undefined;
20
22
  links?: object[] | undefined;
21
23
  hideTitle?: boolean | undefined;
@@ -14,10 +14,15 @@
14
14
  * @type {"default"|"inline"}
15
15
  */
16
16
  export let mode = "default";
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
24
  <dl
20
- class="ons-description-list ons-description-list__items ons-grid ons-grid--gutterless ons-u-mb-no {mode ===
25
+ class="ons-description-list ons-description-list__items ons-grid ons-grid--gutterless ons-u-mb-no {cls} {mode ===
21
26
  'inline'
22
27
  ? 'ons-u-mt-s ons-u-mt-l@l'
23
28
  : 'ons-u-cf'}"
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DescriptionListEvents */
3
3
  /** @typedef {typeof __propDef.slots} DescriptionListSlots */
4
4
  export default class DescriptionList extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  title?: string | undefined;
6
7
  mode?: "default" | "inline" | undefined;
7
8
  items?: object[] | undefined;
@@ -15,6 +16,7 @@ export type DescriptionListSlots = typeof __propDef.slots;
15
16
  import { SvelteComponentTyped } from "svelte";
16
17
  declare const __propDef: {
17
18
  props: {
19
+ cls?: string | undefined;
18
20
  title?: string | undefined;
19
21
  mode?: "default" | "inline" | undefined;
20
22
  items?: object[] | undefined;
@@ -18,6 +18,11 @@
18
18
  * @type {boolean}
19
19
  */
20
20
  export let open = false;
21
+ /**
22
+ * Optional: Set an additional CSS class for the component
23
+ * @type {string}
24
+ */
25
+ export let cls = "";
21
26
 
22
27
  function doToggle(e) {
23
28
  dispatch("toggle", { open: e.newState === "open", e });
@@ -25,7 +30,7 @@
25
30
  </script>
26
31
 
27
32
  <details
28
- class="ons-details ons-js-details ons-details--initialised"
33
+ class="ons-details ons-js-details ons-details--initialised {cls}"
29
34
  class:ons-details--open={open}
30
35
  bind:open
31
36
  on:toggle={doToggle}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DetailsEvents */
3
3
  /** @typedef {typeof __propDef.slots} DetailsSlots */
4
4
  export default class Details extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  title?: string | undefined;
6
7
  open?: boolean | undefined;
7
8
  headingTag?: "h2" | "h3" | undefined;
@@ -19,6 +20,7 @@ export type DetailsSlots = typeof __propDef.slots;
19
20
  import { SvelteComponentTyped } from "svelte";
20
21
  declare const __propDef: {
21
22
  props: {
23
+ cls?: string | undefined;
22
24
  title?: string | undefined;
23
25
  open?: boolean | undefined;
24
26
  headingTag?: "h2" | "h3" | undefined;
@@ -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;