Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from charlesfries/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
charlesfries authored Apr 28, 2023
2 parents e1ee1e4 + 8fb0809 commit 077a8a0
Show file tree
Hide file tree
Showing 40 changed files with 11,935 additions and 15,025 deletions.
4 changes: 2 additions & 2 deletions .ember-cli
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
23 changes: 14 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
],
env: {
browser: true,
Expand All @@ -27,6 +29,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -42,16 +45,18 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
},
{
// typescript files
files: ['**/*.ts'],
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
},
],
};
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.24
- ember-lts-3.28
- ember-lts-4.4
- ember-lts-4.8
- ember-release
- ember-beta
- ember-canary
- ember-classic
- embroider-safe
- embroider-optimized

Expand All @@ -76,4 +75,4 @@ jobs:
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/config/ember-try.js
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
Expand Down
5 changes: 2 additions & 3 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use strict';

module.exports = {
singleQuote: true,
overrides: [
{
files: '*.hbs',
files: '*.{js,ts}',
options: {
singleQuote: false,
singleQuote: true,
},
},
],
Expand Down
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# unconventional files
/blueprints/*/files/

# compiled output
/dist/

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

module.exports = {
extends: ['stylelint-config-standard-scss', 'stylelint-prettier/recommended'],
};
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022
Copyright (c) 2023

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ This addon is only compatible with Boostrap 5+.

## Compatibility

* Ember.js v3.24 or above
* Ember CLI v3.24 or above
* Node.js v12 or above
* Ember.js v4.4 or above
* Ember CLI v4.4 or above
* Node.js v14 or above


## Installation
Expand Down
2 changes: 1 addition & 1 deletion addon/components/bs/accordion/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface BsAccordionItemComponentSignature {
typeof BsAccordionButtonComponent,
'item' | 'show'
>;
body?: typeof BsAccordionBodyComponent;
body?: WithBoundArgs<typeof BsAccordionBodyComponent, never>;
}
];
};
Expand Down
3 changes: 2 additions & 1 deletion addon/components/bs/breadcrumb.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import BsBaseComponent from './base';

import type BsBreadcrumbItemComponent from './breadcrumb/item';
import type { WithBoundArgs } from '@glint/template';

export interface BsBreadcrumbComponentSignature {
Element: HTMLElement;
Blocks: {
default: [
{
item: typeof BsBreadcrumbItemComponent;
item: WithBoundArgs<typeof BsBreadcrumbItemComponent, never>;
}
];
};
Expand Down
3 changes: 2 additions & 1 deletion addon/components/bs/button-group.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import BsBaseComponent from './base';

import type BsButtonComponent from './button';
import type { WithBoundArgs } from '@glint/template';

export interface BsButtonGroupComponentSignature {
Element: HTMLElement;
Expand All @@ -11,7 +12,7 @@ export interface BsButtonGroupComponentSignature {
Blocks: {
default: [
{
button: typeof BsButtonComponent;
button: WithBoundArgs<typeof BsButtonComponent, never>;
}
];
};
Expand Down
7 changes: 4 additions & 3 deletions addon/components/bs/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import BsBaseComponent from './base';
import type BsCardBodyComponent from './card/body';
import type BsCardFooterComponent from './card/footer';
import type BsCardHeaderComponent from './card/header';
import type { WithBoundArgs } from '@glint/template';

export interface BsCardComponentSignature {
Element: HTMLDivElement;
Blocks: {
default: [
{
header: typeof BsCardHeaderComponent;
body: typeof BsCardBodyComponent;
footer: typeof BsCardFooterComponent;
header: WithBoundArgs<typeof BsCardHeaderComponent, never>;
body: WithBoundArgs<typeof BsCardBodyComponent, never>;
footer: WithBoundArgs<typeof BsCardFooterComponent, never>;
}
];
};
Expand Down
7 changes: 4 additions & 3 deletions addon/components/bs/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BsBaseComponent from './base';
import type BsDropdownDividerComponent from './dropdown/divider';
import type BsDropdownHeaderComponent from './dropdown/header';
import type BsDropdownItemComponent from './dropdown/item';
import type { WithBoundArgs } from '@glint/template';

export interface BsDropdownComponentSignature {
Element: HTMLDivElement;
Expand All @@ -12,9 +13,9 @@ export interface BsDropdownComponentSignature {
Blocks: {
default: [
{
divider: typeof BsDropdownDividerComponent;
header: typeof BsDropdownHeaderComponent;
item: typeof BsDropdownItemComponent;
divider: WithBoundArgs<typeof BsDropdownDividerComponent, never>;
header: WithBoundArgs<typeof BsDropdownHeaderComponent, never>;
item: WithBoundArgs<typeof BsDropdownItemComponent, never>;
}
];
};
Expand Down
6 changes: 1 addition & 5 deletions addon/components/bs/dropdown/item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@
class="dropdown-item {{if @color (concat 'text-' @color)}}"
...attributes
>
{{#if (has-block)}}
{{yield}}
{{else}}
{{@label}}
{{/if}}
{{yield}}
</button>
1 change: 0 additions & 1 deletion addon/components/bs/dropdown/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import BsBaseComponent from '../base';
export interface BsDropdownItemComponentSignature {
Element: HTMLButtonElement;
Args: {
label?: string;
color?: string;
};
Blocks: {
Expand Down
1 change: 0 additions & 1 deletion addon/components/bs/list-group.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
{{if @color (concat 'list-group-item-' @color)}}"
...attributes
>
{{! @glint-nocheck }}
{{yield
(hash
item=(component "bs/list-group/item")
Expand Down
4 changes: 2 additions & 2 deletions addon/components/bs/list-group.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BsBaseComponent from './base';

import type BsListGroupItemComponent from './list-group/item';
import type { ComponentLike } from '@glint/template';
import type { ComponentLike, WithBoundArgs } from '@glint/template';

export interface BsListGroupComponentSignature {
Element: HTMLUListElement;
Expand All @@ -14,7 +14,7 @@ export interface BsListGroupComponentSignature {
Blocks: {
default: [
{
item: typeof BsListGroupItemComponent;
item: WithBoundArgs<typeof BsListGroupItemComponent, never>;
'link-to': ComponentLike<{
Element: HTMLAnchorElement;
Args: {
Expand Down
5 changes: 3 additions & 2 deletions addon/components/bs/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { action } from '@ember/object';

import type BsModalBodyComponent from './modal/body';
import type BsModalFooterComponent from './modal/footer';
import type { WithBoundArgs } from '@glint/template';

export interface BsModalComponentSignature {
Element: HTMLDivElement;
Expand All @@ -21,8 +22,8 @@ export interface BsModalComponentSignature {
Blocks: {
default: [
{
body: typeof BsModalBodyComponent;
footer: typeof BsModalFooterComponent;
body: WithBoundArgs<typeof BsModalBodyComponent, never>;
footer: WithBoundArgs<typeof BsModalFooterComponent, never>;
}
];
};
Expand Down
14 changes: 2 additions & 12 deletions addon/components/bs/nav.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BsBaseComponent from './base';

import type { ComponentLike } from '@glint/template';
import type { LinkToKeyword } from '@glint/environment-ember-loose/-private/intrinsics/link-to';

export interface BsNavComponentSignature {
Element: HTMLElement;
Expand All @@ -11,17 +11,7 @@ export interface BsNavComponentSignature {
Blocks: {
default: [
{
'link-to': ComponentLike<{
Element: HTMLAnchorElement;
Args: {
route: string;
model?: unknown;
query?: unknown;
};
Blocks: {
default: [];
};
}>;
'link-to': LinkToKeyword;
}
];
};
Expand Down
5 changes: 3 additions & 2 deletions addon/components/bs/offcanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { action } from '@ember/object';

import type BsOffcanvasHeaderComponent from './offcanvas/header';
import type BsOffcanvasBodyComponent from './offcanvas/body';
import type { WithBoundArgs } from '@glint/template';

export interface BsOffcanvasComponentSignature {
Element: HTMLDivElement;
Expand All @@ -14,8 +15,8 @@ export interface BsOffcanvasComponentSignature {
Blocks: {
default: [
{
header: typeof BsOffcanvasHeaderComponent;
body: typeof BsOffcanvasBodyComponent;
header: WithBoundArgs<typeof BsOffcanvasHeaderComponent, never>;
body: WithBoundArgs<typeof BsOffcanvasBodyComponent, never>;
}
];
};
Expand Down
9 changes: 6 additions & 3 deletions addon/components/bs/pagination.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,28 @@
<a
class="page-link"
href="#"
{{on "click" (prevent-default @onPrevious)}}
data-test-previous
{{! prevent-default }}
{{on "click" @onPrevious}}
>Previous</a>
</li>
{{#each this.pages as |page index|}}
<li class="page-item {{if (eq @curPage index) 'active'}}">
<a
class="page-link"
href="#"
{{on "click" (prevent-default (fn @onSelect index))}}
{{! prevent-default }}
{{on "click" (fn @onSelect index)}}
>{{inc index}}</a>
</li>
{{/each}}
<li class="page-item {{unless this.canNext 'disabled'}}">
<a
class="page-link"
href="#"
{{on "click" (prevent-default @onNext)}}
data-test-next
{{! prevent-default }}
{{on "click" @onNext}}
>Next</a>
</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion addon/components/bs/progress.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import BsBaseComponent from './base';

import type BsProgressBarComponent from './progress/bar';
import type { WithBoundArgs } from '@glint/template';

export interface BsProgressComponentSignature {
Element: HTMLElement;
Blocks: {
default: [
{
bar: typeof BsProgressBarComponent;
bar: WithBoundArgs<typeof BsProgressBarComponent, never>;
}
];
};
Expand Down
Loading

0 comments on commit 077a8a0

Please sign in to comment.