diff --git a/package-lock.json b/package-lock.json index 75193c5..72c7aa0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "8.0.0", "license": "Apache-2.0", "dependencies": { + "@neovici/cosmoz-collapse": "^1.3.0", "@neovici/cosmoz-router": "^11.0.0", "@neovici/cosmoz-utils": "^6.0.0", "@pionjs/pion": "^2.0.0", @@ -3327,6 +3328,11 @@ "typescript": "^5.1.0" } }, + "node_modules/@neovici/cosmoz-collapse": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@neovici/cosmoz-collapse/-/cosmoz-collapse-1.3.0.tgz", + "integrity": "sha512-m+FMz2WW9RYrkBILNA5EE+CDTvo+YqxR7fvZb62Qab9bFScJwTxk/DbmMEL/Dsawr76YjrIfX76Z5DcvEZ468w==" + }, "node_modules/@neovici/cosmoz-router": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/@neovici/cosmoz-router/-/cosmoz-router-11.0.0.tgz", diff --git a/package.json b/package.json index ecb8e6b..60ec4f6 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "./next/*": "./src/next/*" }, "dependencies": { + "@neovici/cosmoz-collapse": "^1.3.0", "@neovici/cosmoz-router": "^11.0.0", "@neovici/cosmoz-utils": "^6.0.0", "@pionjs/pion": "^2.0.0", diff --git a/src/cosmoz-tab-card.js b/src/cosmoz-tab-card.js index 7da5af0..b34df79 100644 --- a/src/cosmoz-tab-card.js +++ b/src/cosmoz-tab-card.js @@ -1,5 +1,18 @@ // @license Copyright (C) 2015 Neovici AB - Apache 2 License -import { html, component } from '@pionjs/pion'; +import { html, component, useState, useEffect } from '@pionjs/pion'; +import '@neovici/cosmoz-collapse'; +import { when } from 'lit-html/directives/when.js'; +import { css } from './utils'; + +const collapseIcon = html` + +`; /** @@ -19,60 +32,97 @@ Custom property | Description | Default `--cosmoz-tab-card-content-line-height` | Card content line height | `initial` `--cosmoz-tab-card-content-padding` | Card content padding | `initial` */ -const CosmozTabCard = ({ heading }) => - html` - -