@onsvisual/svelte-components 1.0.0-next.5 → 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 (87) hide show
  1. package/dist/datavis/DataTile/DataTile.svelte +6 -1
  2. package/dist/datavis/DataTile/DataTile.svelte.d.ts +2 -0
  3. package/dist/datavis/Table/Table.svelte +6 -0
  4. package/dist/datavis/Table/Table.svelte.d.ts +2 -0
  5. package/dist/decorators/Divider/Divider.svelte +8 -3
  6. package/dist/decorators/Divider/Divider.svelte.d.ts +2 -0
  7. package/dist/inputs/Button/Button.svelte +7 -2
  8. package/dist/inputs/Button/Button.svelte.d.ts +2 -0
  9. package/dist/inputs/Checkbox/Checkbox.svelte +6 -1
  10. package/dist/inputs/Checkbox/Checkbox.svelte.d.ts +2 -0
  11. package/dist/inputs/Checkboxes/Checkboxes.svelte +6 -1
  12. package/dist/inputs/Checkboxes/Checkboxes.svelte.d.ts +2 -0
  13. package/dist/inputs/Dropdown/Dropdown.svelte +6 -1
  14. package/dist/inputs/Dropdown/Dropdown.svelte.d.ts +2 -0
  15. package/dist/inputs/ErrorPanel/ErrorPanel.svelte +6 -1
  16. package/dist/inputs/ErrorPanel/ErrorPanel.svelte.d.ts +2 -0
  17. package/dist/inputs/ErrorSummary/ErrorSummary.svelte +6 -1
  18. package/dist/inputs/ErrorSummary/ErrorSummary.svelte.d.ts +2 -0
  19. package/dist/inputs/Input/Input.svelte +6 -1
  20. package/dist/inputs/Input/Input.svelte.d.ts +2 -0
  21. package/dist/inputs/Radios/Radios.svelte +6 -1
  22. package/dist/inputs/Radios/Radios.svelte.d.ts +2 -0
  23. package/dist/inputs/Select/Select.svelte +6 -1
  24. package/dist/inputs/Select/Select.svelte.d.ts +2 -0
  25. package/dist/inputs/Textarea/Textarea.svelte +6 -1
  26. package/dist/inputs/Textarea/Textarea.svelte.d.ts +2 -0
  27. package/dist/layout/Accordion/Accordion.svelte +1 -1
  28. package/dist/layout/Accordion/Accordion.svelte.d.ts +2 -2
  29. package/dist/layout/Breadcrumb/Breadcrumb.svelte +6 -1
  30. package/dist/layout/Breadcrumb/Breadcrumb.svelte.d.ts +4 -2
  31. package/dist/layout/Card/Card.svelte +1 -1
  32. package/dist/layout/Card/Card.svelte.d.ts +2 -2
  33. package/dist/layout/Contents/Contents.svelte +6 -1
  34. package/dist/layout/Contents/Contents.svelte.d.ts +2 -0
  35. package/dist/layout/DescriptionList/DescriptionList.svelte +6 -1
  36. package/dist/layout/DescriptionList/DescriptionList.svelte.d.ts +2 -0
  37. package/dist/layout/Details/Details.svelte +6 -1
  38. package/dist/layout/Details/Details.svelte.d.ts +2 -0
  39. package/dist/layout/DocumentList/DocumentList.svelte +6 -1
  40. package/dist/layout/DocumentList/DocumentList.svelte.d.ts +2 -0
  41. package/dist/layout/Footer/Footer.svelte +1 -1
  42. package/dist/layout/Footer/Footer.svelte.d.ts +4 -4
  43. package/dist/layout/Grid/Grid.svelte +3 -3
  44. package/dist/layout/Grid/Grid.svelte.d.ts +2 -2
  45. package/dist/layout/Header/Header.svelte +1 -1
  46. package/dist/layout/Header/Header.svelte.d.ts +4 -4
  47. package/dist/layout/Hero/Hero.stories.svelte +2 -1
  48. package/dist/layout/Hero/Hero.svelte +9 -8
  49. package/dist/layout/Hero/Hero.svelte.d.ts +8 -6
  50. package/dist/layout/Highlight/Highlight.svelte +15 -22
  51. package/dist/layout/Highlight/Highlight.svelte.d.ts +6 -6
  52. package/dist/layout/Image/Image.svelte +6 -1
  53. package/dist/layout/Image/Image.svelte.d.ts +2 -0
  54. package/dist/layout/List/List.svelte +6 -1
  55. package/dist/layout/List/List.svelte.d.ts +2 -0
  56. package/dist/layout/NavSections/NavSection.svelte +1 -1
  57. package/dist/layout/NavSections/NavSection.svelte.d.ts +2 -2
  58. package/dist/layout/NavSections/NavSections.svelte +3 -3
  59. package/dist/layout/NavSections/NavSections.svelte.d.ts +2 -2
  60. package/dist/layout/Notice/Notice.svelte +6 -1
  61. package/dist/layout/Notice/Notice.svelte.d.ts +2 -0
  62. package/dist/layout/PhaseBanner/PhaseBanner.svelte +6 -1
  63. package/dist/layout/PhaseBanner/PhaseBanner.svelte.d.ts +2 -0
  64. package/dist/layout/RelatedContent/RelatedContent.svelte +6 -1
  65. package/dist/layout/RelatedContent/RelatedContent.svelte.d.ts +2 -0
  66. package/dist/layout/Scroller/Scroller.svelte +6 -1
  67. package/dist/layout/Scroller/Scroller.svelte.d.ts +2 -0
  68. package/dist/layout/Scroller/ScrollerSection.svelte +6 -1
  69. package/dist/layout/Scroller/ScrollerSection.svelte.d.ts +2 -0
  70. package/dist/layout/Section/Section.svelte +3 -3
  71. package/dist/layout/Section/Section.svelte.d.ts +2 -2
  72. package/dist/layout/ShareButtons/ShareButtons.svelte +8 -3
  73. package/dist/layout/ShareButtons/ShareButtons.svelte.d.ts +2 -0
  74. package/dist/layout/Summary/Summary.svelte +6 -1
  75. package/dist/layout/Summary/Summary.svelte.d.ts +2 -0
  76. package/dist/layout/Tabs/Tabs.svelte +6 -1
  77. package/dist/layout/Tabs/Tabs.svelte.d.ts +2 -0
  78. package/dist/templates/intro.mdx +1 -1
  79. package/dist/wrappers/Container/Container.svelte +41 -28
  80. package/dist/wrappers/Container/Container.svelte.d.ts +8 -4
  81. package/dist/wrappers/Container/docs/component.md +4 -2
  82. package/dist/wrappers/Theme/Theme.svelte +4 -4
  83. package/dist/wrappers/Theme/Theme.svelte.d.ts +6 -6
  84. package/dist/wrappers/Theme/docs/component.md +1 -1
  85. package/dist/wrappers/Theme/themes.d.ts +28 -0
  86. package/dist/wrappers/Theme/themes.js +2 -1
  87. package/package.json +1 -1
@@ -36,9 +36,14 @@
36
36
  * @type {string}
37
37
  */
38
38
  export let source = "";
39
+ /**
40
+ * Optional: Set an additional CSS class for the component
41
+ * @type {string}
42
+ */
43
+ export let cls = "";
39
44
  </script>
40
45
 
41
- <Card {title} {href} mode="featured">
46
+ <Card {title} {href} mode="featured" {cls}>
42
47
  {#if value}
43
48
  <p class="headline-figures__figure ons-u-fs-3xl ons-u-fs-2xl@m">{value}</p>
44
49
  {/if}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DataTileEvents */
3
3
  /** @typedef {typeof __propDef.slots} DataTileSlots */
4
4
  export default class DataTile extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  caption?: string | undefined;
6
7
  data?: object[] | null | undefined;
7
8
  source?: string | undefined;
@@ -19,6 +20,7 @@ export type DataTileSlots = typeof __propDef.slots;
19
20
  import { SvelteComponentTyped } from "svelte";
20
21
  declare const __propDef: {
21
22
  props: {
23
+ cls?: string | undefined;
22
24
  caption?: string | undefined;
23
25
  data?: object[] | null | undefined;
24
26
  source?: string | undefined;
@@ -39,12 +39,18 @@
39
39
  Array.isArray(data) && data[0] ? Object.keys(data[0]).map((key) => ({ key, label: key })) : [];
40
40
  let _data = [...data];
41
41
  let sort = columns.map((c) => "none");
42
+ /**
43
+ * Optional: Set an additional CSS class for the component
44
+ * @type {string}
45
+ */
46
+ export let cls = "";
42
47
 
43
48
  $: sortable = columns.map((d) => d.sortable).includes(true);
44
49
  $: formatters = columns.map((d) => formatter(d.dp));
45
50
  </script>
46
51
 
47
52
  <div
53
+ class={cls}
48
54
  style:overflow={typeof height === "number" ? "auto" : null}
49
55
  style:height={typeof height === "number" ? `${height}px` : null}
50
56
  style:display={typeof height !== "number" ? "contents" : null}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} TableEvents */
3
3
  /** @typedef {typeof __propDef.slots} TableSlots */
4
4
  export default class Table extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  height?: number | "auto" | undefined;
6
7
  data?: object[] | undefined;
7
8
  title?: string | undefined;
@@ -19,6 +20,7 @@ export type TableSlots = typeof __propDef.slots;
19
20
  import { SvelteComponentTyped } from "svelte";
20
21
  declare const __propDef: {
21
22
  props: {
23
+ cls?: string | undefined;
22
24
  height?: number | "auto" | undefined;
23
25
  data?: object[] | undefined;
24
26
  title?: string | undefined;
@@ -17,18 +17,23 @@
17
17
  */
18
18
  export let mode = "dark";
19
19
  /**
20
- * Optional margin above section
20
+ * Adds margin above section
21
21
  * @type {boolean}
22
22
  */
23
23
  export let marginTop = !!hr;
24
24
  /**
25
- * Optional margin below section
25
+ * Adds margin below section
26
26
  * @type {boolean}
27
27
  */
28
28
  export let marginBottom = true;
29
+ /**
30
+ * Optional: Set an additional CSS class for the component
31
+ * @type {string}
32
+ */
33
+ export let cls = "";
29
34
  </script>
30
35
 
31
- <Container {width} {marginTop} {marginBottom}>
36
+ <Container {width} {marginTop} {marginBottom} {cls}>
32
37
  <hr
33
38
  class="ons-u-mt-no"
34
39
  class:ons-u-vh={!hr}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DividerEvents */
3
3
  /** @typedef {typeof __propDef.slots} DividerSlots */
4
4
  export default class Divider extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
6
7
  marginTop?: boolean | undefined;
7
8
  marginBottom?: boolean | undefined;
@@ -17,6 +18,7 @@ export type DividerSlots = typeof __propDef.slots;
17
18
  import { SvelteComponentTyped } from "svelte";
18
19
  declare const __propDef: {
19
20
  props: {
21
+ cls?: string | undefined;
20
22
  width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
21
23
  marginTop?: boolean | undefined;
22
24
  marginBottom?: boolean | undefined;
@@ -54,6 +54,11 @@
54
54
  * @type {string}
55
55
  */
56
56
  export let download = "";
57
+ /**
58
+ * Optional: Set an additional CSS class for the component
59
+ * @type {string}
60
+ */
61
+ export let cls = "";
57
62
  </script>
58
63
 
59
64
  {#if href}
@@ -61,7 +66,7 @@
61
66
  href={!disabled ? href : null}
62
67
  role="button"
63
68
  {download}
64
- class="ons-btn ons-btn--link ons-js-submit-btn"
69
+ class="ons-btn ons-btn--link ons-js-submit-btn {cls}"
65
70
  class:ons-btn--small={small}
66
71
  class:ons-btn--secondary={variant === "secondary"}
67
72
  class:ons-btn--ghost={variant === "ghost"}
@@ -91,7 +96,7 @@
91
96
  {:else}
92
97
  <button
93
98
  {type}
94
- class="ons-btn"
99
+ class="ons-btn {cls}"
95
100
  class:ons-btn--small={small}
96
101
  class:ons-btn--secondary={variant === "secondary"}
97
102
  class:ons-btn--ghost={variant === "ghost"}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} ButtonEvents */
3
3
  /** @typedef {typeof __propDef.slots} ButtonSlots */
4
4
  export default class Button extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  small?: boolean | undefined;
6
7
  href?: string | undefined;
7
8
  type?: "button" | "reset" | "sumbit" | undefined;
@@ -27,6 +28,7 @@ export type ButtonSlots = typeof __propDef.slots;
27
28
  import { SvelteComponentTyped } from "svelte";
28
29
  declare const __propDef: {
29
30
  props: {
31
+ cls?: string | undefined;
30
32
  small?: boolean | undefined;
31
33
  href?: string | undefined;
32
34
  type?: "button" | "reset" | "sumbit" | undefined;
@@ -53,6 +53,11 @@
53
53
  * @type {boolean}
54
54
  */
55
55
  export let compact = false;
56
+ /**
57
+ * Optional: Set an additional CSS class for the component
58
+ * @type {string}
59
+ */
60
+ export let cls = "";
56
61
 
57
62
  const checkboxes = getContext("checkboxes");
58
63
 
@@ -96,7 +101,7 @@
96
101
  </script>
97
102
 
98
103
  <span
99
- class="ons-checkboxes__item"
104
+ class="ons-checkboxes__item {cls}"
100
105
  class:ons-checkboxes__item--ghost={variant === "ghost"}
101
106
  class:ons-checkboxes__item--no-border={compact}
102
107
  >
@@ -4,6 +4,7 @@
4
4
  export default class Checkbox extends SvelteComponentTyped<{
5
5
  id: string;
6
6
  label: string;
7
+ cls?: string | undefined;
7
8
  group?: object[] | null | undefined;
8
9
  compact?: boolean | undefined;
9
10
  variant?: "default" | "ghost" | undefined;
@@ -26,6 +27,7 @@ declare const __propDef: {
26
27
  props: {
27
28
  id: string;
28
29
  label: string;
30
+ cls?: string | undefined;
29
31
  group?: object[] | null | undefined;
30
32
  compact?: boolean | undefined;
31
33
  variant?: "default" | "ghost" | undefined;
@@ -30,12 +30,17 @@
30
30
  * @type {object[]}
31
31
  */
32
32
  export let value = [];
33
+ /**
34
+ * Optional: Set an additional CSS class for the component
35
+ * @type {string}
36
+ */
37
+ export let cls = "";
33
38
 
34
39
  const checkboxes = writable([]);
35
40
  setContext("checkboxes", checkboxes);
36
41
  </script>
37
42
 
38
- <fieldset class="ons-fieldset">
43
+ <fieldset class="ons-fieldset {cls}">
39
44
  {#if title}
40
45
  <legend class="ons-fieldset__legend ons-u-mb-no">
41
46
  <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} CheckboxesEvents */
3
3
  /** @typedef {typeof __propDef.slots} CheckboxesSlots */
4
4
  export default class Checkboxes extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  label?: string | undefined;
6
7
  title?: string | undefined;
7
8
  compact?: boolean | undefined;
@@ -22,6 +23,7 @@ export type CheckboxesSlots = typeof __propDef.slots;
22
23
  import { SvelteComponentTyped } from "svelte";
23
24
  declare const __propDef: {
24
25
  props: {
26
+ cls?: string | undefined;
25
27
  label?: string | undefined;
26
28
  title?: string | undefined;
27
29
  compact?: boolean | undefined;
@@ -33,9 +33,14 @@
33
33
  * @type {object[]}
34
34
  */
35
35
  export let options = [];
36
+ /**
37
+ * Optional: Set an additional CSS class for the component
38
+ * @type {string}
39
+ */
40
+ export let cls = "";
36
41
  </script>
37
42
 
38
- <div class="ons-field">
43
+ <div class="ons-field {cls}">
39
44
  {#if label}
40
45
  <label class="ons-label" for={id} class:ons-u-vh={hideLabel}>{label}</label>
41
46
  {/if}
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} DropdownEvents */
3
3
  /** @typedef {typeof __propDef.slots} DropdownSlots */
4
4
  export default class Dropdown extends SvelteComponentTyped<{
5
+ cls?: string | undefined;
5
6
  id?: string | undefined;
6
7
  label?: string | undefined;
7
8
  value?: object | null | undefined;
@@ -20,6 +21,7 @@ export type DropdownSlots = 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
  label?: string | undefined;
25
27
  value?: object | null | undefined;
@@ -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;