Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Jul 8, 2024
1 parent cdeff5c commit a3c2b8a
Show file tree
Hide file tree
Showing 5 changed files with 806 additions and 2,680 deletions.
3 changes: 2 additions & 1 deletion carbon-components-ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
"sass-loader": "^13.3.2",
"typescript": "^5.0.4",
"typescript-plugin-css-modules": "^5.0.1",
"yui": "^3.18.1"
"yui": "^3.18.1",
"fix-bad-declaration-output": "^1.1.4"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion carbon-components-ember/src/components/list.gts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface ListComponentSignature<T> {
'length' | 'onPageChanged'
>;
Column: typeof ListColumnComponent;
BodyRows: WithBoundArgs<typeof ListBodyComponent, 'list' | 'items'>;
BodyRows: WithBoundArgs<typeof ListBodyComponent<T>, 'list' | 'items'>;
Header: typeof ListHeaderComponent;
},
];
Expand Down
13 changes: 7 additions & 6 deletions carbon-components-ember/src/components/list/-body.gts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import { default as ListRow } from './-row.gts';
import Component from '@glimmer/component';
import { type WithBoundArgs } from '@glint/template';
import ListRowComponent from '../../components/list/-row.gts';
import ListRowComponent from '../list/-row.gts';
import type ListComponent from '../list.gts';
import { hash } from '@ember/helper';

type Args = {
items: any[];
list: any;
type Args<T> = {
items: T[];
list: ListComponent<T>;
};

export interface ListBodyComponentSignature<T> {
Args: Args;
Args: Args<T>;
Blocks: {
default: [
{
Row: WithBoundArgs<
typeof ListRowComponent<any>,
typeof ListRowComponent<T>,
'list' | 'isHeader' | 'item'
>;
item: T;
Expand Down
3 changes: 2 additions & 1 deletion carbon-components-ember/src/components/select.gts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,21 @@ type Args<T extends ContentValue> = {
placeholder?: string;
disabled?: boolean;
searchEnabled?: boolean;
onSelect?: (item: T) => void;
addItem?: (item: T) => void;
removeItem?: (item: T) => void;
} & (
| {
selected?: T[];
multiple: true;
onSelect?: (item: T[]) => void;
onOpen?: PowerSelectArgs<T>['onOpen'];
search?: PowerSelectArgs<T>['search'];
selectFocused?: PowerSelectArgs<T>['onFocus'];
}
| {
selected?: T;
multiple?: false;
onSelect?: (item: T) => void;
onOpen?: PowerSelectArgs<T>['onOpen'];
search?: PowerSelectArgs<T>['search'];
selectFocused?: PowerSelectArgs<T>['onFocus'];
Expand Down
Loading

0 comments on commit a3c2b8a

Please sign in to comment.