Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: pnpm

- name: 'Install dependencies'
Expand All @@ -46,7 +45,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: pnpm

- name: Install Dependencies
Expand All @@ -57,7 +56,7 @@ jobs:

- name: Run Tests
run: pnpm --filter test-app test:ember

test-shadow-dom:
name: "Tests Shadow dom"
runs-on: ubuntu-latest
Expand All @@ -66,19 +65,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember-shadow-dom

Expand All @@ -90,10 +89,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: pnpm

- name: Install Dependencies
Expand Down Expand Up @@ -122,6 +120,7 @@ jobs:
- ember-lts-5.4
- ember-lts-5.8
- ember-lts-5.12
- ember-lts-6.4
- glimmer-component-v1
- ember-release
- ember-beta
Expand All @@ -136,7 +135,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: pnpm

- name: Install Dependencies
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ on:
jobs:
push-dist:
name: Push dist
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 18
Expand All @@ -31,4 +33,4 @@ jobs:
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-basic-dropdown'
working-directory: 'ember-basic-dropdown'
2 changes: 1 addition & 1 deletion config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "4.0.0",
"version": "4.1.2",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
Expand Down
7 changes: 0 additions & 7 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,5 @@
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try

# broccoli-debug
/DEBUG/
9 changes: 4 additions & 5 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

# misc
!.*
.lint-todo/

# ember-try
/.node_modules.ember-try/
/pnpm-lock.ember-try.yaml
.*/
/pnpm-lock.yaml
ember-cli-update.json
*.html
6 changes: 0 additions & 6 deletions docs/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ module.exports = {
overrides: [
{
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
options: {
singleQuote: true,
},
},
{
files: '*.{gjs,gts}',
options: {
singleQuote: true,
templateSingleQuote: false,
Expand Down
3 changes: 0 additions & 3 deletions docs/.stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@

# compiled output
/dist/

# addons
/.node_modules.ember-try/
2 changes: 1 addition & 1 deletion docs/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
extends: ['stylelint-config-standard'],
};
5 changes: 5 additions & 0 deletions docs/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'docs/config/environment';
import Prism from 'prismjs';
import { importSync, isDevelopingApp, macroCondition } from '@embroider/macros';
import 'prismjs/plugins/normalize-whitespace/prism-normalize-whitespace';
import 'prismjs/components/prism-css';
import 'prismjs/components/prism-scss';
Expand All @@ -14,6 +15,10 @@ import { setup } from 'prismjs-glimmer';

import 'prismjs/themes/prism.css';

if (macroCondition(isDevelopingApp())) {
importSync('./deprecation-workflow');
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
setup(Prism);

Expand Down
2 changes: 1 addition & 1 deletion docs/app/components/code-block.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<pre
class="{{this.languageClass}} {{if @showLineNumbers "line-numbers"}}"
class="{{this.languageClass}} {{if @showLineNumbers 'line-numbers'}}"
data-start={{@start}}
>
{{~! ~}}
Expand Down
41 changes: 32 additions & 9 deletions docs/app/components/code-example.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
<article class="code-example" ...attributes>
<nav class="code-example-tabs">
{{#if @hbs}}
<div class="code-example-tab {{if (eq this.activeTab "hbs") 'active'}}" role="button" {{on "click" (fn this.setActiveTab "hbs")}}>Template</div>
<div
class="code-example-tab {{if (eq this.activeTab 'hbs') 'active'}}"
role="button"
{{on "click" (fn this.setActiveTab "hbs")}}
>Template</div>
{{/if}}
{{#if @hbs2}}
<div class="code-sample-tab {{if (eq this.activeTab "hbs2") 'active'}}" role="button" {{on "click" (fn this.setActiveTab "hbs2")}}>Template 2</div>
<div
class="code-sample-tab {{if (eq this.activeTab 'hbs2') 'active'}}"
role="button"
{{on "click" (fn this.setActiveTab "hbs2")}}
>Template 2</div>
{{/if}}
{{#if @js}}
<div class="code-example-tab {{if (eq this.activeTab "js") 'active'}}" role="button" {{on "click" (fn this.setActiveTab "js")}}>Javascript</div>
<div
class="code-example-tab {{if (eq this.activeTab 'js') 'active'}}"
role="button"
{{on "click" (fn this.setActiveTab "js")}}
>Javascript</div>
{{/if}}
{{#if @css}}
<div class="code-example-tab {{if (eq this.activeTab "css") 'active'}}" role="button" {{on "click" (fn this.setActiveTab "css")}}>CSS</div>
<div
class="code-example-tab {{if (eq this.activeTab 'css') 'active'}}"
role="button"
{{on "click" (fn this.setActiveTab "css")}}
>CSS</div>
{{/if}}
{{#if this.showResult}}
<div class="code-example-tab {{if (eq this.activeTab "result") 'active'}}" role="button" {{on "click" (fn this.setActiveTab "result")}}>Result</div>
<div
class="code-example-tab {{if (eq this.activeTab 'result') 'active'}}"
role="button"
{{on "click" (fn this.setActiveTab "result")}}
>Result</div>
{{/if}}
</nav>
{{#if (and @hbs (eq this.activeTab 'hbs'))}}
{{#if (and @hbs (eq this.activeTab "hbs"))}}
{{#let (get-code-snippet @hbs) as |snippet|}}
<CodeBlock @language="handlebars" @code={{snippet.source}} />
{{/let}}
Expand All @@ -26,18 +46,21 @@
<CodeBlock @language="handlebars" @code={{snippet.source}} />
{{/let}}
{{/if}}
{{#if (and @js (eq this.activeTab 'js'))}}
{{#if (and @js (eq this.activeTab "js"))}}
{{#let (get-code-snippet @js) as |snippet|}}
<CodeBlock @language={{snippet.language}} @code={{snippet.source}} />
{{/let}}
{{/if}}
{{#if (and @css (eq this.activeTab 'css'))}}
{{#if (and @css (eq this.activeTab "css"))}}
{{#let (get-code-snippet @css) as |snippet|}}
<CodeBlock @language={{snippet.language}} @code={{snippet.source}} />
{{/let}}
{{/if}}
{{#if (and this.showResult (has-block))}}
<div class="code-example-snippet result {{if (eq this.activeTab 'result') 'active'}}">
<div
class="code-example-snippet result
{{if (eq this.activeTab 'result') 'active'}}"
>
{{yield this.partialName}}
</div>
{{/if}}
Expand Down
6 changes: 1 addition & 5 deletions docs/app/components/code-inline.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<code
...attributes
class="{{this.languageClass}}"
{{this.setPrismCode}}
>
<code ...attributes class="{{this.languageClass}}" {{this.setPrismCode}}>
{{~! ~}}{{this.prismCode}}{{~! ~}}
</code>
4 changes: 2 additions & 2 deletions docs/app/components/snippets/animations-1.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<BasicDropdown as |dd|>
<dd.Trigger class='trigger-bootstrap-feel'>Animate me</dd.Trigger>
<dd.Trigger class="trigger-bootstrap-feel">Animate me</dd.Trigger>

<dd.Content class='content-bootstrap-feel width-300 slide-fade'>
<dd.Content class="content-bootstrap-feel width-300 slide-fade">
<li>Miguel</li>
<li>Matthew</li>
<li>Dan</li>
Expand Down
42 changes: 21 additions & 21 deletions docs/app/components/snippets/content-events-1.hbs
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<div class='demo-fake-body'>
<nav class='demo-fake-nav'>
<div class='demo-fake-logo'>Bookface</div>
<div class='demo-fake-notifications'>
<BasicDropdown @horizontalPosition='right' as |dd|>
{{!-- template-lint-disable no-pointer-down-event-binding --}}
<div class="demo-fake-body">
<nav class="demo-fake-nav">
<div class="demo-fake-logo">Bookface</div>
<div class="demo-fake-notifications">
<BasicDropdown @horizontalPosition="right" as |dd|>
{{! template-lint-disable no-pointer-down-event-binding }}
<dd.Trigger
{{on 'mousedown' this.prevent}}
{{on 'mouseenter' (fn this.open dd)}}
{{on 'mouseleave' (fn this.closeLater dd)}}
{{on "mousedown" this.prevent}}
{{on "mouseenter" (fn this.open dd)}}
{{on "mouseleave" (fn this.closeLater dd)}}
>
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
fill='currentColor'
d='M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z'
fill="currentColor"
d="M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z"
></path>
</svg>
<span
class='demo-fake-notifications-count'
class="demo-fake-notifications-count"
>{{this.notifications.length}}</span>
</dd.Trigger>

<dd.Content
{{on 'mouseenter' (fn this.open dd)}}
{{on 'mouseleave' (fn this.closeLater dd)}}
class='demo-fake-notifications-content'
{{on "mouseenter" (fn this.open dd)}}
{{on "mouseleave" (fn this.closeLater dd)}}
class="demo-fake-notifications-content"
>
<ul class='demo-fake-notifications-list'>
<ul class="demo-fake-notifications-list">
{{#each this.notifications as |notification|}}
<li class='demo-fake-notification-entry'>
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'>
<li class="demo-fake-notification-entry">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
<path
fill='currentColor'
d='M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h352a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48zm-16.39 307.37l-15 65A15 15 0 0 1 354 416C194 416 64 286.29 64 126a15.7 15.7 0 0 1 11.63-14.61l65-15A18.23 18.23 0 0 1 144 96a16.27 16.27 0 0 1 13.79 9.09l30 70A17.9 17.9 0 0 1 189 181a17 17 0 0 1-5.5 11.61l-37.89 31a231.91 231.91 0 0 0 110.78 110.78l31-37.89A17 17 0 0 1 299 291a17.85 17.85 0 0 1 5.91 1.21l70 30A16.25 16.25 0 0 1 384 336a17.41 17.41 0 0 1-.39 3.37z'
fill="currentColor"
d="M400 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h352a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48zm-16.39 307.37l-15 65A15 15 0 0 1 354 416C194 416 64 286.29 64 126a15.7 15.7 0 0 1 11.63-14.61l65-15A18.23 18.23 0 0 1 144 96a16.27 16.27 0 0 1 13.79 9.09l30 70A17.9 17.9 0 0 1 189 181a17 17 0 0 1-5.5 11.61l-37.89 31a231.91 231.91 0 0 0 110.78 110.78l31-37.89A17 17 0 0 1 299 291a17.85 17.85 0 0 1 5.91 1.21l70 30A16.25 16.25 0 0 1 384 336a17.41 17.41 0 0 1-.39 3.37z"
></path>
</svg>
<span>{{notification.text}}</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/snippets/custom-position-1.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<BasicDropdown @calculatePosition={{this.calculatePosition}} as |dd|>
<dd.Trigger class='trigger-bootstrap-feel'>Click me</dd.Trigger>
<dd.Trigger class="trigger-bootstrap-feel">Click me</dd.Trigger>

<dd.Content class='content-bootstrap-feel arrow-left-content'>
<dd.Content class="content-bootstrap-feel arrow-left-content">
Hello from the right!
<br />
See? It wasn't that hard.
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/snippets/custom-position-2.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@onOpen={{perform this.addNames}}
as |dd|
>
<dd.Trigger class='trigger-bootstrap-feel'>Click me</dd.Trigger>
<dd.Trigger class="trigger-bootstrap-feel">Click me</dd.Trigger>

<dd.Content class='content-bootstrap-feel arrow-left-content'>
<dd.Content class="content-bootstrap-feel arrow-left-content">
{{#each this.names as |name|}}
{{name}}
<br />
Expand Down
4 changes: 2 additions & 2 deletions docs/app/components/snippets/disabled-1.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<BasicDropdown @disabled={{true}} as |dd|>
<dd.Trigger class='trigger-bootstrap-feel'>Click me</dd.Trigger>
<dd.Trigger class="trigger-bootstrap-feel">Click me</dd.Trigger>

<dd.Content class='content-bootstrap-feel'>
<dd.Content class="content-bootstrap-feel">
You can't see this
</dd.Content>
</BasicDropdown>
6 changes: 3 additions & 3 deletions docs/app/components/snippets/dropdown-events-1.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<BasicDropdown @onOpen={{perform this.loadUsers}} as |dd|>
<dd.Trigger class='trigger-bootstrap-feel'>Click me</dd.Trigger>
<dd.Trigger class="trigger-bootstrap-feel">Click me</dd.Trigger>

<dd.Content class='content-bootstrap-feel width-300'>
<dd.Content class="content-bootstrap-feel width-300">
{{#if this.loadUsers.isRunning}}
<div class='circular-loader'></div>
<div class="circular-loader"></div>
{{else}}
{{#each this.loadUsers.lastSuccessful.value as |user|}}
<p>{{user.name}} - {{user.assignment}}</p>
Expand Down
Loading