Skip to content

Commit 0428231

Browse files
authored
feat(cdk-experimental/listbox): add file skeleton (#19612)
* build: created listbox directory and BUILD.bazel file. * build: filled BUILD.bazel file. * build: Added required files to listbox directory. * build: added listbox option directive and renamed listbox directive files. * fix: Removed currently unused dependencies from BUILD.bazel. Added listbox to cdk-experimental entry points. * Removed BUILD.bazel for temp test * fix: filled out BUILD.bazel and other required listbox files. * fix: changed double quote to single quote and added listbox module to public-api. * fix: semicolon. * removed tabindex from listbox host and changed option directive name. * build: Added required files to listbox directory. * build: added listbox option directive and renamed listbox directive files. * fix: filled out BUILD.bazel and other required listbox files. * build: Added required files to listbox directory. * build: added listbox option directive and renamed listbox directive files. * build: Added required files to listbox directory. * build: added listbox option directive and renamed listbox directive files. * fix: reduced indent size from 4 to 2. * fix: chore, removed empty files that appeared after rebase. * fix: added back menu to config.bzl
1 parent d8c2d63 commit 0428231

File tree

7 files changed

+81
-0
lines changed

7 files changed

+81
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
/src/cdk-experimental/menu/** @jelbourn @andy9775
129129
/src/cdk-experimental/popover-edit/** @kseamon @andrewseguin
130130
/src/cdk-experimental/scrolling/** @mmalerba
131+
/src/cdk-experimental/listbox/** @nielsr98 @jelbourn
131132

132133
# Docs examples & guides
133134
/guides/** @jelbourn

src/cdk-experimental/config.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CDK_EXPERIMENTAL_ENTRYPOINTS = [
33
"column-resize",
44
"dialog",
55
"menu",
6+
"listbox",
67
"popover-edit",
78
"scrolling",
89
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
load("//tools:defaults.bzl", "ng_module")
2+
3+
package(default_visibility = ["//visibility:public"])
4+
5+
ng_module(
6+
name = "listbox",
7+
srcs = glob(
8+
["**/*.ts"],
9+
exclude = ["**/*.spec.ts"],
10+
),
11+
module_name = "@angular/cdk-experimental/listbox",
12+
)

src/cdk-experimental/listbox/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './public-api';
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {NgModule} from '@angular/core';
10+
import {CdkListbox, CdkOption} from './listbox';
11+
12+
const EXPORTED_DECLARATIONS = [CdkListbox, CdkOption];
13+
@NgModule({
14+
exports: EXPORTED_DECLARATIONS,
15+
declarations: EXPORTED_DECLARATIONS,
16+
})
17+
export class CdkListboxModule {}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {Directive} from '@angular/core';
10+
11+
@Directive({
12+
selector: '[cdkOption]',
13+
exportAs: 'cdkOption',
14+
host: {
15+
role: 'option',
16+
}
17+
})
18+
export class CdkOption {
19+
20+
}
21+
22+
@Directive({
23+
selector: '[cdkListbox]',
24+
exportAs: 'cdkListbox',
25+
host: {
26+
role: 'listbox',
27+
}
28+
})
29+
export class CdkListbox {
30+
31+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './listbox';
10+
export * from './listbox-module';

0 commit comments

Comments
 (0)