@onsvisual/svelte-components 1.1.35 → 1.1.36

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.
@@ -17,11 +17,21 @@
17
17
  * @type {"h2"|"h3"}
18
18
  */
19
19
  export let headingTag = "h2";
20
+ /**
21
+ * Set the initial status of the accordion item to open (non-reactive)
22
+ * @type {boolean}
23
+ */
24
+ export let open = false;
20
25
 
21
26
  const dataGroup = getContext("dataGroup");
22
27
  </script>
23
28
 
24
- <div {id} class="ons-details ons-js-details ons-details--accordion" data-group={dataGroup}>
29
+ <div
30
+ {id}
31
+ class="ons-details ons-js-details ons-details--accordion"
32
+ data-group={dataGroup}
33
+ data-open={open}
34
+ >
25
35
  <div class="ons-details__heading ons-js-details-heading" role="button">
26
36
  {#if headingTag === "h3"}
27
37
  <h3 class="ons-details__title ons-u-fs-r--b">{title}</h3>
@@ -4,6 +4,7 @@
4
4
  export default class AccordionItem extends SvelteComponentTyped<{
5
5
  id?: string | undefined;
6
6
  title?: string | null | undefined;
7
+ open?: boolean | undefined;
7
8
  headingTag?: "h2" | "h3" | undefined;
8
9
  }, {
9
10
  [evt: string]: CustomEvent<any>;
@@ -19,6 +20,7 @@ declare const __propDef: {
19
20
  props: {
20
21
  id?: string | undefined;
21
22
  title?: string | null | undefined;
23
+ open?: boolean | undefined;
22
24
  headingTag?: "h2" | "h3" | undefined;
23
25
  };
24
26
  events: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.35",
3
+ "version": "1.1.36",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",