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

Commit 077a8a0

Browse files
authored
Merge pull request #12 from charlesfries/development
Development
2 parents e1ee1e4 + 8fb0809 commit 077a8a0

40 files changed

+11935
-15025
lines changed

.ember-cli

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"disableAnalytics": false,
99

1010
/**
11-
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12-
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
11+
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
12+
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
1313
*/
1414
"isTypeScriptProject": false
1515
}

.eslintrc.js

+14-9
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ module.exports = {
44
root: true,
55
parser: '@typescript-eslint/parser',
66
parserOptions: {
7-
ecmaVersion: 2018,
7+
ecmaVersion: 'latest',
88
sourceType: 'module',
9-
ecmaFeatures: {
10-
legacyDecorators: true,
9+
requireConfigFile: false,
10+
babelOptions: {
11+
plugins: [
12+
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
13+
],
1114
},
1215
},
1316
plugins: ['ember', '@typescript-eslint'],
1417
extends: [
1518
'eslint:recommended',
1619
'plugin:ember/recommended',
1720
'plugin:prettier/recommended',
18-
'plugin:@typescript-eslint/recommended',
1921
],
2022
env: {
2123
browser: true,
@@ -27,6 +29,7 @@ module.exports = {
2729
files: [
2830
'./.eslintrc.js',
2931
'./.prettierrc.js',
32+
'./.stylelintrc.js',
3033
'./.template-lintrc.js',
3134
'./ember-cli-build.js',
3235
'./index.js',
@@ -42,16 +45,18 @@ module.exports = {
4245
browser: false,
4346
node: true,
4447
},
45-
plugins: ['node'],
46-
extends: ['plugin:node/recommended'],
47-
rules: {
48-
'@typescript-eslint/no-var-requires': 'off',
49-
},
48+
extends: ['plugin:n/recommended'],
5049
},
5150
{
5251
// test files
5352
files: ['tests/**/*-test.{js,ts}'],
5453
extends: ['plugin:qunit/recommended'],
5554
},
55+
{
56+
// typescript files
57+
files: ['**/*.ts'],
58+
plugins: ['@typescript-eslint'],
59+
extends: ['plugin:@typescript-eslint/recommended'],
60+
},
5661
],
5762
};

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ jobs:
5757
fail-fast: false
5858
matrix:
5959
try-scenario:
60-
- ember-lts-3.24
61-
- ember-lts-3.28
60+
- ember-lts-4.4
61+
- ember-lts-4.8
6262
- ember-release
6363
- ember-beta
6464
- ember-canary
65-
- ember-classic
6665
- embroider-safe
6766
- embroider-optimized
6867

@@ -76,4 +75,4 @@ jobs:
7675
- name: Install Dependencies
7776
run: npm ci
7877
- name: Run Tests
79-
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
78+
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
/.gitignore
1919
/.prettierignore
2020
/.prettierrc.js
21+
/.stylelintignore
22+
/.stylelintrc.js
2123
/.template-lintrc.js
2224
/.travis.yml
2325
/.watchmanconfig
2426
/bower.json
25-
/config/ember-try.js
2627
/CONTRIBUTING.md
2728
/ember-cli-build.js
2829
/testem.js

.prettierrc.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
'use strict';
22

33
module.exports = {
4-
singleQuote: true,
54
overrides: [
65
{
7-
files: '*.hbs',
6+
files: '*.{js,ts}',
87
options: {
9-
singleQuote: false,
8+
singleQuote: true,
109
},
1110
},
1211
],

.stylelintignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# unconventional files
2+
/blueprints/*/files/
3+
4+
# compiled output
5+
/dist/
6+
7+
# addons
8+
/.node_modules.ember-try/

.stylelintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: ['stylelint-config-standard-scss', 'stylelint-prettier/recommended'],
5+
};

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2022
3+
Copyright (c) 2023
44

55
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:
66

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ This addon is only compatible with Boostrap 5+.
1414

1515
## Compatibility
1616

17-
* Ember.js v3.24 or above
18-
* Ember CLI v3.24 or above
19-
* Node.js v12 or above
17+
* Ember.js v4.4 or above
18+
* Ember CLI v4.4 or above
19+
* Node.js v14 or above
2020

2121

2222
## Installation

addon/components/bs/accordion/item.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface BsAccordionItemComponentSignature {
1818
typeof BsAccordionButtonComponent,
1919
'item' | 'show'
2020
>;
21-
body?: typeof BsAccordionBodyComponent;
21+
body?: WithBoundArgs<typeof BsAccordionBodyComponent, never>;
2222
}
2323
];
2424
};

addon/components/bs/breadcrumb.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import BsBaseComponent from './base';
22

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

56
export interface BsBreadcrumbComponentSignature {
67
Element: HTMLElement;
78
Blocks: {
89
default: [
910
{
10-
item: typeof BsBreadcrumbItemComponent;
11+
item: WithBoundArgs<typeof BsBreadcrumbItemComponent, never>;
1112
}
1213
];
1314
};

addon/components/bs/button-group.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import BsBaseComponent from './base';
22

33
import type BsButtonComponent from './button';
4+
import type { WithBoundArgs } from '@glint/template';
45

56
export interface BsButtonGroupComponentSignature {
67
Element: HTMLElement;
@@ -11,7 +12,7 @@ export interface BsButtonGroupComponentSignature {
1112
Blocks: {
1213
default: [
1314
{
14-
button: typeof BsButtonComponent;
15+
button: WithBoundArgs<typeof BsButtonComponent, never>;
1516
}
1617
];
1718
};

addon/components/bs/card.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import BsBaseComponent from './base';
33
import type BsCardBodyComponent from './card/body';
44
import type BsCardFooterComponent from './card/footer';
55
import type BsCardHeaderComponent from './card/header';
6+
import type { WithBoundArgs } from '@glint/template';
67

78
export interface BsCardComponentSignature {
89
Element: HTMLDivElement;
910
Blocks: {
1011
default: [
1112
{
12-
header: typeof BsCardHeaderComponent;
13-
body: typeof BsCardBodyComponent;
14-
footer: typeof BsCardFooterComponent;
13+
header: WithBoundArgs<typeof BsCardHeaderComponent, never>;
14+
body: WithBoundArgs<typeof BsCardBodyComponent, never>;
15+
footer: WithBoundArgs<typeof BsCardFooterComponent, never>;
1516
}
1617
];
1718
};

addon/components/bs/dropdown.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import BsBaseComponent from './base';
33
import type BsDropdownDividerComponent from './dropdown/divider';
44
import type BsDropdownHeaderComponent from './dropdown/header';
55
import type BsDropdownItemComponent from './dropdown/item';
6+
import type { WithBoundArgs } from '@glint/template';
67

78
export interface BsDropdownComponentSignature {
89
Element: HTMLDivElement;
@@ -12,9 +13,9 @@ export interface BsDropdownComponentSignature {
1213
Blocks: {
1314
default: [
1415
{
15-
divider: typeof BsDropdownDividerComponent;
16-
header: typeof BsDropdownHeaderComponent;
17-
item: typeof BsDropdownItemComponent;
16+
divider: WithBoundArgs<typeof BsDropdownDividerComponent, never>;
17+
header: WithBoundArgs<typeof BsDropdownHeaderComponent, never>;
18+
item: WithBoundArgs<typeof BsDropdownItemComponent, never>;
1819
}
1920
];
2021
};

addon/components/bs/dropdown/item.hbs

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@
33
class="dropdown-item {{if @color (concat 'text-' @color)}}"
44
...attributes
55
>
6-
{{#if (has-block)}}
7-
{{yield}}
8-
{{else}}
9-
{{@label}}
10-
{{/if}}
6+
{{yield}}
117
</button>

addon/components/bs/dropdown/item.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import BsBaseComponent from '../base';
33
export interface BsDropdownItemComponentSignature {
44
Element: HTMLButtonElement;
55
Args: {
6-
label?: string;
76
color?: string;
87
};
98
Blocks: {

addon/components/bs/list-group.hbs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
{{if @color (concat 'list-group-item-' @color)}}"
77
...attributes
88
>
9-
{{! @glint-nocheck }}
109
{{yield
1110
(hash
1211
item=(component "bs/list-group/item")

addon/components/bs/list-group.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import BsBaseComponent from './base';
22

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

66
export interface BsListGroupComponentSignature {
77
Element: HTMLUListElement;
@@ -14,7 +14,7 @@ export interface BsListGroupComponentSignature {
1414
Blocks: {
1515
default: [
1616
{
17-
item: typeof BsListGroupItemComponent;
17+
item: WithBoundArgs<typeof BsListGroupItemComponent, never>;
1818
'link-to': ComponentLike<{
1919
Element: HTMLAnchorElement;
2020
Args: {

addon/components/bs/modal.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { action } from '@ember/object';
44

55
import type BsModalBodyComponent from './modal/body';
66
import type BsModalFooterComponent from './modal/footer';
7+
import type { WithBoundArgs } from '@glint/template';
78

89
export interface BsModalComponentSignature {
910
Element: HTMLDivElement;
@@ -21,8 +22,8 @@ export interface BsModalComponentSignature {
2122
Blocks: {
2223
default: [
2324
{
24-
body: typeof BsModalBodyComponent;
25-
footer: typeof BsModalFooterComponent;
25+
body: WithBoundArgs<typeof BsModalBodyComponent, never>;
26+
footer: WithBoundArgs<typeof BsModalFooterComponent, never>;
2627
}
2728
];
2829
};

addon/components/bs/nav.ts

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import BsBaseComponent from './base';
22

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

55
export interface BsNavComponentSignature {
66
Element: HTMLElement;
@@ -11,17 +11,7 @@ export interface BsNavComponentSignature {
1111
Blocks: {
1212
default: [
1313
{
14-
'link-to': ComponentLike<{
15-
Element: HTMLAnchorElement;
16-
Args: {
17-
route: string;
18-
model?: unknown;
19-
query?: unknown;
20-
};
21-
Blocks: {
22-
default: [];
23-
};
24-
}>;
14+
'link-to': LinkToKeyword;
2515
}
2616
];
2717
};

addon/components/bs/offcanvas.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { action } from '@ember/object';
44

55
import type BsOffcanvasHeaderComponent from './offcanvas/header';
66
import type BsOffcanvasBodyComponent from './offcanvas/body';
7+
import type { WithBoundArgs } from '@glint/template';
78

89
export interface BsOffcanvasComponentSignature {
910
Element: HTMLDivElement;
@@ -14,8 +15,8 @@ export interface BsOffcanvasComponentSignature {
1415
Blocks: {
1516
default: [
1617
{
17-
header: typeof BsOffcanvasHeaderComponent;
18-
body: typeof BsOffcanvasBodyComponent;
18+
header: WithBoundArgs<typeof BsOffcanvasHeaderComponent, never>;
19+
body: WithBoundArgs<typeof BsOffcanvasBodyComponent, never>;
1920
}
2021
];
2122
};

addon/components/bs/pagination.hbs

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,28 @@
44
<a
55
class="page-link"
66
href="#"
7-
{{on "click" (prevent-default @onPrevious)}}
87
data-test-previous
8+
{{! prevent-default }}
9+
{{on "click" @onPrevious}}
910
>Previous</a>
1011
</li>
1112
{{#each this.pages as |page index|}}
1213
<li class="page-item {{if (eq @curPage index) 'active'}}">
1314
<a
1415
class="page-link"
1516
href="#"
16-
{{on "click" (prevent-default (fn @onSelect index))}}
17+
{{! prevent-default }}
18+
{{on "click" (fn @onSelect index)}}
1719
>{{inc index}}</a>
1820
</li>
1921
{{/each}}
2022
<li class="page-item {{unless this.canNext 'disabled'}}">
2123
<a
2224
class="page-link"
2325
href="#"
24-
{{on "click" (prevent-default @onNext)}}
2526
data-test-next
27+
{{! prevent-default }}
28+
{{on "click" @onNext}}
2629
>Next</a>
2730
</li>
2831
</ul>

addon/components/bs/progress.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import BsBaseComponent from './base';
22

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

56
export interface BsProgressComponentSignature {
67
Element: HTMLElement;
78
Blocks: {
89
default: [
910
{
10-
bar: typeof BsProgressBarComponent;
11+
bar: WithBoundArgs<typeof BsProgressBarComponent, never>;
1112
}
1213
];
1314
};

0 commit comments

Comments
 (0)