@neovici/cosmoz-bottom-bar 9.3.0 → 9.4.0

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.
@@ -1,11 +1,11 @@
1
1
  /* eslint-disable max-len */
2
- import { html } from 'lit-html';
3
- import { map } from 'lit-html/directives/map.js';
4
- import { html as polymerHtml } from '@polymer/polymer/polymer-element.js';
5
- import { component, css, useEffect, useLayoutEffect, useMemo, useState, } from '@pionjs/pion';
6
2
  import { toggleSize } from '@neovici/cosmoz-collapse/toggle';
7
- import { useActivity } from '@neovici/cosmoz-utils/keybindings/use-activity';
8
3
  import '@neovici/cosmoz-dropdown';
4
+ import { useActivity } from '@neovici/cosmoz-utils/keybindings/use-activity';
5
+ import { component, css, useEffect, useLayoutEffect, useMemo, useRef, useState, } from '@pionjs/pion';
6
+ import { html as polymerHtml } from '@polymer/polymer/polymer-element.js';
7
+ import { html } from 'lit-html';
8
+ import { map } from 'lit-html/directives/map.js';
9
9
  import overflow from './overflow';
10
10
  const style = css `
11
11
  :host {
@@ -86,8 +86,8 @@ const style = css `
86
86
  flex: 0 0 auto;
87
87
  }
88
88
  #bottomBarToolbar::slotted(
89
- :not(slot):not([unstyled])[data-visibility='hidden']
90
- ) {
89
+ :not(slot):not([unstyled])[data-visibility='hidden']
90
+ ) {
91
91
  visibility: hidden;
92
92
  width: 100%;
93
93
  order: 9999;
@@ -164,6 +164,7 @@ const useMenuButtons = (host) => {
164
164
  };
165
165
  const CosmozBottomBar = (host) => {
166
166
  const { active = false } = host;
167
+ const mounted = useRef(false);
167
168
  useActivity({
168
169
  activity: openMenu,
169
170
  callback: () => openActionsMenu(host),
@@ -173,7 +174,13 @@ const CosmozBottomBar = (host) => {
173
174
  const { setButtonStates, menuButtons } = useMenuButtons(host);
174
175
  const toggle = useMemo(() => toggleSize('height'), []);
175
176
  useLayoutEffect(() => {
176
- toggle(host, active);
177
+ if (!mounted.current) {
178
+ toggle(host, active, { duration: 0 });
179
+ }
180
+ else {
181
+ toggle(host, active);
182
+ }
183
+ mounted.current = true;
177
184
  }, [active]);
178
185
  return html ` <div id="bar" part="bar">
179
186
  <div id="info" part="info"><slot name="info"></slot></div>
package/package.json CHANGED
@@ -1,91 +1,85 @@
1
1
  {
2
- "name": "@neovici/cosmoz-bottom-bar",
3
- "version": "9.3.0",
4
- "description": "A responsive bottom-bar that can house buttons/actions and a menu for the buttons that won't fit the available width.",
5
- "keywords": [
6
- "polymer",
7
- "web-components"
8
- ],
9
- "homepage": "https://github.com/neovici/cosmoz-bottom-bar#readme",
10
- "bugs": {
11
- "url": "https://github.com/neovici/cosmoz-bottom-bar/issues"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/neovici/cosmoz-bottom-bar.git"
16
- },
17
- "license": "Apache-2.0",
18
- "author": "Neovici Development",
19
- "main": "dist/index.js",
20
- "exports": {
21
- ".": "./dist/index.js"
22
- },
23
- "files": [
24
- "dist/*",
25
- "types"
26
- ],
27
- "scripts": {
28
- "lint": "tsc && eslint --cache .",
29
- "build": "tsc -p tsconfig.build.json",
30
- "start": "npm run storybook:start",
31
- "test": "wtr --coverage",
32
- "test:watch": "wtr --watch",
33
- "prepare": "husky",
34
- "storybook:start": "storybook dev -p 8000",
35
- "storybook:build": "storybook build",
36
- "storybook:deploy": "storybook-to-ghpages",
37
- "storybook:preview": "npm run storybook:build && http-server -d ./storybook-static/"
38
- },
39
- "release": {
40
- "plugins": [
41
- "@semantic-release/commit-analyzer",
42
- "@semantic-release/release-notes-generator",
43
- "@semantic-release/changelog",
44
- "@semantic-release/github",
45
- "@semantic-release/npm",
46
- "@semantic-release/git"
47
- ],
48
- "branch": "master"
49
- },
50
- "publishConfig": {
51
- "access": "public"
52
- },
53
- "dependencies": {
54
- "@neovici/cosmoz-collapse": "^1.5.0",
55
- "@neovici/cosmoz-dropdown": "^6.0.0",
56
- "@neovici/cosmoz-utils": "^6.13.1",
57
- "@pionjs/pion": "^2.5.2",
58
- "@polymer/polymer": "^3.3.0",
59
- "lit-html": "^2.0.0 || ^3.0.0"
60
- },
61
- "devDependencies": {
62
- "@commitlint/cli": "^19.0.0",
63
- "@commitlint/config-conventional": "^19.0.0",
64
- "@neovici/cfg": "^1.13.0",
65
- "@open-wc/testing": "^4.0.0",
66
- "@polymer/iron-icon": "^3.0.1",
67
- "@polymer/iron-icons": "^3.0.1",
68
- "@polymer/paper-button": "^3.0.0",
69
- "@polymer/paper-toggle-button": "^3.0.0",
70
- "@semantic-release/changelog": "^6.0.0",
71
- "@semantic-release/git": "^10.0.0",
72
- "@storybook/addon-essentials": "^8.6.9",
73
- "@storybook/addon-links": "^7.0.0",
74
- "@storybook/builder-vite": "8.6.9",
75
- "@storybook/storybook-deployer": "^2.8.5",
76
- "@storybook/web-components": "8.6.9",
77
- "@types/mocha": "^10.0.6",
78
- "@web/storybook-builder": "^0.2.1",
79
- "@web/storybook-framework-web-components": "^0.2.0",
80
- "@webcomponents/webcomponentsjs": "^2.5.0",
81
- "esbuild": "^0.25.0",
82
- "eslint": "^8.57.1",
83
- "http-server": "^14.1.1",
84
- "husky": "^9.1.1",
85
- "rollup-plugin-esbuild": "^6.1.1",
86
- "semantic-release": "^24.0.0",
87
- "sinon": "^19.0.0",
88
- "storybook": "^8.6.9",
89
- "typescript": "^5.0.0"
90
- }
2
+ "name": "@neovici/cosmoz-bottom-bar",
3
+ "version": "9.4.0",
4
+ "description": "A responsive bottom-bar that can house buttons/actions and a menu for the buttons that won't fit the available width.",
5
+ "keywords": [
6
+ "polymer",
7
+ "web-components"
8
+ ],
9
+ "homepage": "https://github.com/neovici/cosmoz-bottom-bar#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/neovici/cosmoz-bottom-bar/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/neovici/cosmoz-bottom-bar.git"
16
+ },
17
+ "license": "Apache-2.0",
18
+ "author": "Neovici Development",
19
+ "main": "dist/index.js",
20
+ "exports": {
21
+ ".": "./dist/index.js"
22
+ },
23
+ "files": [
24
+ "dist/*",
25
+ "types"
26
+ ],
27
+ "scripts": {
28
+ "lint": "tsc && eslint --cache .",
29
+ "build": "tsc -p tsconfig.build.json",
30
+ "start": "npm run storybook:start",
31
+ "test": "wtr --coverage",
32
+ "test:watch": "wtr --watch",
33
+ "prepare": "husky",
34
+ "storybook:start": "storybook dev -p 8000",
35
+ "storybook:build": "storybook build",
36
+ "storybook:deploy": "storybook-to-ghpages",
37
+ "storybook:preview": "npm run storybook:build && http-server -d ./storybook-static/"
38
+ },
39
+ "release": {
40
+ "plugins": [
41
+ "@semantic-release/commit-analyzer",
42
+ "@semantic-release/release-notes-generator",
43
+ "@semantic-release/changelog",
44
+ "@semantic-release/github",
45
+ "@semantic-release/npm",
46
+ "@semantic-release/git"
47
+ ],
48
+ "branch": "master"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "dependencies": {
54
+ "@neovici/cosmoz-collapse": "^1.5.0",
55
+ "@neovici/cosmoz-dropdown": "^6.0.0",
56
+ "@neovici/cosmoz-utils": "^6.13.1",
57
+ "@pionjs/pion": "^2.5.2",
58
+ "@polymer/polymer": "^3.3.0",
59
+ "lit-html": "^2.0.0 || ^3.0.0"
60
+ },
61
+ "devDependencies": {
62
+ "@commitlint/cli": "^20.1.0",
63
+ "@commitlint/config-conventional": "^20.0.0",
64
+ "@neovici/cfg": "^2.0.0",
65
+ "@open-wc/testing": "^4.0.0",
66
+ "@polymer/iron-icon": "^3.0.1",
67
+ "@polymer/iron-icons": "^3.0.1",
68
+ "@polymer/paper-button": "^3.0.0",
69
+ "@polymer/paper-toggle-button": "^3.0.0",
70
+ "@semantic-release/changelog": "^6.0.0",
71
+ "@semantic-release/git": "^10.0.0",
72
+ "@storybook/web-components-vite": "^9.1.5",
73
+ "@types/mocha": "^10.0.6",
74
+ "@webcomponents/webcomponentsjs": "^2.5.0",
75
+ "esbuild": "^0.27.0",
76
+ "eslint": "^9.0.0",
77
+ "http-server": "^14.1.1",
78
+ "husky": "^9.1.1",
79
+ "rollup-plugin-esbuild": "^6.1.1",
80
+ "semantic-release": "^25.0.1",
81
+ "sinon": "^21.0.0",
82
+ "storybook": "^9.1.5",
83
+ "typescript": "^5.0.0"
84
+ }
91
85
  }