@neovici/cosmoz-tabs 5.4.2 → 6.0.0-beta.1
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.
- package/package.json +6 -6
- package/src/next/cosmoz-tab.js +1 -1
- package/src/next/use-tabs.js +4 -3
- package/src/render.js +1 -1
- package/src/use-tabs.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-tabs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-beta.1",
|
|
4
4
|
"description": "A multi views container element that allow navigation between the views using tabs or an accordion.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"./next/*": "./src/next/*"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@neovici/cosmoz-page-router": "^
|
|
64
|
-
"@neovici/cosmoz-utils": "^
|
|
63
|
+
"@neovici/cosmoz-page-router": "^9.0.0-beta.3",
|
|
64
|
+
"@neovici/cosmoz-utils": "^4.0.0-beta.2",
|
|
65
65
|
"@polymer/iron-icon": "^3.0.0",
|
|
66
66
|
"@polymer/iron-icons": "^3.0.0",
|
|
67
67
|
"compute-scroll-into-view": "^1.0.17",
|
|
68
|
-
"haunted": "^
|
|
69
|
-
"lit-html": "^
|
|
68
|
+
"haunted": "^5.0.0",
|
|
69
|
+
"lit-html": "^2.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@commitlint/cli": "^17.0.0",
|
|
73
73
|
"@commitlint/config-conventional": "^17.0.0",
|
|
74
74
|
"@neovici/cfg": "^1.11.0",
|
|
75
|
-
"@open-wc/testing": "^
|
|
75
|
+
"@open-wc/testing": "^3.0.0",
|
|
76
76
|
"@polymer/iron-list": "^3.1.0",
|
|
77
77
|
"@semantic-release/changelog": "^6.0.0",
|
|
78
78
|
"@semantic-release/git": "^10.0.0",
|
package/src/next/cosmoz-tab.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { component, useEffect, useLayoutEffect } from 'haunted';
|
|
2
2
|
import { html, nothing } from 'lit-html';
|
|
3
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
4
4
|
import computeScroll from 'compute-scroll-into-view';
|
|
5
5
|
|
|
6
6
|
import style from './cosmoz-tab.css';
|
package/src/next/use-tabs.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable import/group-exports */
|
|
2
2
|
import { html, useMemo, useCallback, useRef } from 'haunted';
|
|
3
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
4
|
-
|
|
3
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
4
|
+
/* eslint-disable-next-line import/no-unresolved */
|
|
5
|
+
import { useHashParam } from '@neovici/cosmoz-page-router/use-hash-param';
|
|
5
6
|
|
|
6
|
-
const isValid = (tab) => !tab.hidden && !tab.
|
|
7
|
+
const isValid = (tab) => !tab.hidden && !tab.disaebled,
|
|
7
8
|
valid = (tabs) => tabs.find(isValid),
|
|
8
9
|
choose = (tabs, name) => {
|
|
9
10
|
const tab = name && tabs.find((tab) => tab.name === name);
|
package/src/render.js
CHANGED
package/src/use-tabs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo, useCallback } from 'haunted';
|
|
2
2
|
import { notifyProperty } from '@neovici/cosmoz-utils/lib/hooks/use-notify-property';
|
|
3
|
-
|
|
3
|
+
/* eslint-disable-next-line import/no-unresolved */
|
|
4
|
+
import { useHashParam, link } from '@neovici/cosmoz-page-router/use-hash-param';
|
|
4
5
|
import { choose, collect, getName, isValid } from './utils';
|
|
5
6
|
import computeScroll from 'compute-scroll-into-view';
|
|
6
7
|
|