Skip to content

Commit

Permalink
fix(components): remove unused dependency
Browse files Browse the repository at this point in the history
- remove unused @lit/motion dependency

Signed-off-by: Cory Rylan <cory@coryrylan.com>
  • Loading branch information
coryrylan committed Jan 1, 2024
1 parent 41e92ea commit 587d935
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
cache: 'npm'
- uses: google/wireit@setup-github-actions-caching/v1
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright install chromium --with-deps chromium
- run: |
export NODE_OPTIONS="--max_old_space_size=4096"
npm run ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: google/wireit@setup-github-actions-caching/v1
- run: npm install -g npm@latest
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npx playwright install chromium --with-deps chromium
- run: |
export NODE_OPTIONS="--max_old_space_size=4096"
npm run ci
Expand Down
265 changes: 137 additions & 128 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"clean": "git clean -dfX",
"reset": "npm run clean && npm ci --prefer-offline --silent --no-audit && npm run ci",
"prepare": "husky install",
"update:playwright": "npx playwright install --with-deps chromium"
"update:playwright": "npx playwright install chromium --with-deps chromium"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
Expand Down Expand Up @@ -196,7 +196,6 @@
"@blueprintui/typography": "file:packages/typography/dist/lib",
"@floating-ui/dom": "1.5.3",
"@floating-ui/utils": "0.1.6",
"@lit-labs/motion": "1.0.5",
"composed-offset-position": "0.0.4",
"lit": "3.1.0",
"modern-normalize": "2.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/components/package.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"@blueprintui/typewriter": "^1.18.1",
"@floating-ui/dom": "^1.5.3",
"@floating-ui/utils": "^0.1.6",
"@lit-labs/motion": "^1.0.5",
"composed-offset-position": "^0.0.4",
"lit": "^3.0.0",
"tslib": "^2.6.2"
Expand Down
3 changes: 1 addition & 2 deletions packages/components/src/dialog/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Position,
stateScrollLock,
attachRootNodeStyles,
fade,
attachInternals,
typePopover
} from '@blueprintui/components/internals';
Expand Down Expand Up @@ -78,7 +77,7 @@ export class BpDialog extends LitElement {

render() {
return html`
<div ${fade(this)} part="internal">
<div part="internal">
${this.closable
? html`<bp-button-icon
@click=${this.hidePopover}
Expand Down
1 change: 0 additions & 1 deletion packages/components/src/internals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export * from './types/index.js';
export * from './services/global.service.js';
export * from './services/i18n.service.js';
export * from './utils/a11y.js';
export * from './utils/animation.js';
export * from './utils/array.js';
export * from './utils/define.js';
export * from './utils/dom.js';
Expand Down
16 changes: 0 additions & 16 deletions packages/components/src/internals/utils/animation.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/components/src/tooltip/element.examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function position() {
<bp-tooltip open anchor="tooltip-action-2" trigger="tooltip-action-2" position="bottom">tooltip bottom</bp-tooltip>
<bp-tooltip open anchor="tooltip-action-3" trigger="tooltip-action-3" position="left">tooltip left</bp-tooltip>
<bp-tooltip open anchor="tooltip-action-4" trigger="tooltip-action-4" position="top">tooltip top</bp-tooltip>
<div bp-layout="grid gap:md cols:6 block:stretch center" style="padding-top: 100px; height: 95vh">
<div bp-layout="grid gap:md cols:6 block:stretch center" style="padding-top: 100px; max-height: 95vh; min-height: 340px;">
<bp-button-icon id="tooltip-action-1" action="flat" shape="info" aria-label="open tooltip"></bp-button-icon>
<bp-button-icon id="tooltip-action-3" action="flat" shape="info" aria-label="open tooltip"></bp-button-icon>
<bp-button-icon id="tooltip-action-2" action="flat" shape="info" aria-label="open tooltip"></bp-button-icon>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/tooltip/element.performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import '@blueprintui/components/include/tooltip.js';
describe('bp-tooltip performance', () => {
// const element = html`<bp-tooltip>hello there</bp-tooltip>`;

it(`should bundle and treeshake under 17.5kb`, async () => {
it(`should bundle and treeshake under 14kb`, async () => {
expect((await testBundleSize('@blueprintui/components/include/tooltip.js', { optimize: true })).kb).toBeLessThan(
17.5
14
);
});

Expand Down
6 changes: 1 addition & 5 deletions packages/components/src/tooltip/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { property } from 'lit/decorators/property.js';
import {
attachInternals,
baseStyles,
fade,
i18n,
I18nService,
typePopover,
Expand Down Expand Up @@ -66,16 +65,13 @@ export class BpTooltip extends LitElement {
/** set default aria/i18n strings */
@property({ type: Object }) accessor i18n = I18nService.keys.actions;

// eslint-disable-next-line
@property({ type: Boolean, reflect: true }) accessor hidden = false; // @lit-labs/motion

static styles = [baseStyles, styles];

declare _internals: ElementInternals;

render() {
return html`
<div ${fade(this)} part="internal">
<div part="internal">
${this.closable
? html`<bp-button-icon
@click=${this.hidePopover}
Expand Down

0 comments on commit 587d935

Please sign in to comment.