Skip to content

Commit

Permalink
Move Overlay component to Glimmer
Browse files Browse the repository at this point in the history
- Also eliminate dependency on @ember/render-modifiers
  • Loading branch information
lukemelia committed Oct 1, 2024
1 parent 4adfc99 commit 1cd5885
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 51 deletions.
36 changes: 0 additions & 36 deletions addon/components/overlay.js

This file was deleted.

9 changes: 9 additions & 0 deletions addon/components/overlay/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div
class={{this.cssClasses}}
tabindex='-1'
data-emd-overlay
{{on 'click' this.handleClick}}
...attributes
>
{{yield}}
</div>
12 changes: 12 additions & 0 deletions addon/components/overlay/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Component from '@glimmer/component';
import { isIOS } from '../../utils/config-utils';
import { htmlSafe } from '@ember/template';

export default class OverlayComponent extends Component {
get cssClasses() {
return htmlSafe(`emd-debug ${isIOS ? 'pointer-cursor' : ''}`);
}
handleClick = (event) => {
this.args.onClickOverlay?.(event);
};
}
10 changes: 0 additions & 10 deletions addon/templates/components/overlay.hbs

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"webpack": "^5.67.0"
},
"peerDependencies": {
"@ember/render-modifiers": "^2.1.0",
"@ember/string": "^3.0.0 || ^4.0.0",
"ember-tether": "^3.0.0",
"liquid-tether": "^2.0.7",
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/dummy/app/helpers/lorem-ipsum.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { helper } from '@ember/component/helper';
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';

let originalText =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, ' +
Expand Down

0 comments on commit 1cd5885

Please sign in to comment.