Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Combo Component #566

Merged
merged 88 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5e6dcc6
scaffold basic component
simeonoff Nov 21, 2022
d04e38e
npm(lit-vitrualizer): virtualizer for combo list
simeonoff Nov 21, 2022
114ad85
feat(combo): basic item implementation
simeonoff Nov 21, 2022
8579ee3
feat(navigation): add item navigation
simeonoff Nov 23, 2022
4944ed2
refactor(combo): activate item on navigation
simeonoff Nov 23, 2022
c0750e8
refactor(combo): update navigation
simeonoff Nov 23, 2022
b706305
refactor(combo): add typings and controllers
simeonoff Nov 26, 2022
b31d406
feat(combo): add item selection and value
simeonoff Nov 27, 2022
a17bc75
refactor(combo): item selection and activation
simeonoff Nov 27, 2022
836c66d
themes(input): bootstrap slotted suffix and prefix
simeonoff Nov 27, 2022
959b51b
themes(combo): bootstrap clear button
simeonoff Nov 27, 2022
7400758
refactor(combo-item): checkbox not focusable
simeonoff Nov 27, 2022
518a1a1
feat(combo): add clear icon
simeonoff Nov 27, 2022
53b8675
refactor(combo): allow selection without valueKey
simeonoff Nov 27, 2022
67d2338
feat(combo): select by valueKey and object values
simeonoff Nov 27, 2022
74eb53a
refactor(combo): add slots and filter input
simeonoff Nov 28, 2022
7e8b4ee
refactor(combo): improve mouse selection
simeonoff Nov 28, 2022
28c33a1
Add Combo theming (#561)
desig9stein Nov 28, 2022
8870f63
feat(combo): filtering and grouping
simeonoff Nov 29, 2022
808d129
feat(combo): add case sensitivity and filteringOptions
simeonoff Nov 29, 2022
4d02b7d
Merge branch 'master' into simeonoff/combo
simeonoff Nov 29, 2022
822a2fb
refactor(combo): update FilteringOptions
simeonoff Nov 29, 2022
c592caf
style(combo): Make search field to look kind of the same as in materi…
desig9stein Nov 29, 2022
5a60c53
fix(combo): lint and filtering
simeonoff Nov 29, 2022
0975a87
Merge branch 'master' into simeonoff/combo
simeonoff Nov 29, 2022
75b4b97
refactor(combo): add properties and templates
simeonoff Nov 29, 2022
57a1b97
refactor(combo): grouping and filtering
simeonoff Nov 29, 2022
9c17eb3
fix(combo): autofocus
simeonoff Nov 29, 2022
37968f4
refactor(combo): focus input and empty template
simeonoff Nov 29, 2022
1f705e0
refactor(combo): update template after reading content
simeonoff Nov 29, 2022
5db6e0a
refactor(combo): hide on blur
simeonoff Nov 30, 2022
c24c294
fix(combo): headers change size
simeonoff Nov 30, 2022
b7cebee
feat(combo): add navigateTo
simeonoff Nov 30, 2022
1a1e139
refactor(combo): update navigation
simeonoff Nov 30, 2022
a5c3b78
refactor(combo): fire rudimentary events
simeonoff Nov 30, 2022
e717777
refactor(combo): add selection controller
simeonoff Nov 30, 2022
41ceb59
refactor(combo): partial ToggleComponent
simeonoff Nov 30, 2022
41fecf2
input prefix/suffix (#568)
desig9stein Nov 30, 2022
a86b1a7
refactor(combo): fix selection controller
simeonoff Dec 1, 2022
48ac5b0
fix(combo): bug fixes
simeonoff Dec 1, 2022
4ef4f35
refactor(combo): fix item click handler
simeonoff Dec 1, 2022
d5ac65b
refactor(combo): add item parts
simeonoff Dec 1, 2022
307e57a
fix(combo): more bug fixes
simeonoff Dec 1, 2022
16c1d66
refactor(combo): expose parts for styling
simeonoff Dec 1, 2022
cf58f34
Combo search (#569)
desig9stein Dec 1, 2022
e724d41
theme(combo): minor fixes
simeonoff Dec 1, 2022
2a72eb0
Merge branch 'master' into simeonoff/combo
simeonoff Dec 1, 2022
c306f27
fix(combo): cast data to ComboRecort<T> array
simeonoff Dec 1, 2022
892d132
refactor(combo): document items
simeonoff Dec 1, 2022
9459315
feat(combo): add validation
simeonoff Dec 1, 2022
d198e20
fix(combo): toggle position and size
simeonoff Dec 1, 2022
5fc271b
theme(combo): fix z-index
simeonoff Dec 1, 2022
9052282
fix(combo): focus target when hiding
simeonoff Dec 2, 2022
639a118
refactor(combo): improve accessibility
simeonoff Dec 2, 2022
8b1d85e
docs(combo): document the exposed parts
simeonoff Dec 2, 2022
52a86d4
refactor(combo): few changes
simeonoff Dec 2, 2022
b0dfbce
fix(combo): accessibility and navigation
simeonoff Dec 2, 2022
d82f47a
spec(combo): initial commit
simeonoff Dec 2, 2022
72501df
Fix combo styling bugs (#571)
desig9stein Dec 2, 2022
7699707
lint(combo-item): fix aria-hidden error
simeonoff Dec 2, 2022
2afbcf9
npm(lit-virtualizer): move to dependencies
simeonoff Dec 2, 2022
19ddf42
refactor(combo): sort group after grouping
simeonoff Dec 2, 2022
117a99d
refactor(combo): address review comments
simeonoff Dec 2, 2022
771e603
refactor(combo): update filter imports
simeonoff Dec 2, 2022
91e7be5
style(input) fix mozzila and safari prefix and suffix. (#572)
desig9stein Dec 2, 2022
065168b
fix(combo): requests update on firstUpdated
simeonoff Dec 2, 2022
ea609ae
spec(combo): add tests
simeonoff Dec 2, 2022
4dc04c4
style(input, icon, combo): fix styling issues (#574)
desig9stein Dec 5, 2022
ce971bc
Merge branch 'master' into simeonoff/combo
simeonoff Dec 5, 2022
6a1720f
fix(combo): group sorting
simeonoff Dec 5, 2022
652ef70
refactor(combo): split up the template
simeonoff Dec 5, 2022
508c700
refactor(combo): change icons based on theme
simeonoff Dec 5, 2022
0009814
fix(select): toggle icon inconsistent with combo
simeonoff Dec 5, 2022
7ec1d84
refactor(combo): change exported parts
simeonoff Dec 5, 2022
4b4d53f
docs(combo): update parts list
simeonoff Dec 5, 2022
3b18246
refactor(combo): mark props/methods as protected
simeonoff Dec 5, 2022
c6ba977
refactor(combo): add item template type
simeonoff Dec 5, 2022
2dddc3f
fix(combo): navigation works properly
simeonoff Dec 6, 2022
2ad0852
style(combo, select, input) update the styles for toggle button (#576)
desig9stein Dec 6, 2022
9164fe8
refactor(combo): pass template props
simeonoff Dec 6, 2022
8266196
chore(combo): update changelog and _package.json
simeonoff Dec 6, 2022
bdaa5f6
Merge branch 'master' into simeonoff/combo
simeonoff Dec 6, 2022
c8192f8
lint(combo): fix lint errors
simeonoff Dec 6, 2022
81eb487
refactor(combo): empty renders between header and footer
simeonoff Dec 6, 2022
b3e5c23
refactor(combo): add header and footer parts
simeonoff Dec 6, 2022
1f70984
fix(combo): empty part
simeonoff Dec 6, 2022
d93429a
Merge branch 'master' into simeonoff/combo
damyanpetev Dec 7, 2022
49be5a6
refactor(combo, select): make themeAdopted protected
simeonoff Dec 7, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Stepper Component [#219](https://github.com/IgniteUI/igniteui-webcomponents/issues/219)
- Combo Component [#411](https://github.com/IgniteUI/igniteui-webcomponents/issues/411)

## [4.0.0] - 2022-11-02
### Changed
Expand Down
25 changes: 23 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
},
"dependencies": {
"@floating-ui/dom": "^1.0.7",
"@lit-labs/virtualizer": "^0.7.2",
"lit": "^2.4.1"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion scripts/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"circular progress",
"checkbox",
"chip",
"combo",
"date input",
"dropdown",
"expansion panel",
Expand All @@ -55,6 +56,7 @@
],
"dependencies": {
"@floating-ui/dom": "^1.0.7",
"lit": "^2.4.1"
"lit": "^2.4.1",
"@lit-labs/virtualizer": "^0.7.2"
}
}
20 changes: 20 additions & 0 deletions src/components/combo/combo-header.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { html, LitElement } from 'lit';
import { themes } from '../../theming/theming-decorator.js';
import { styles } from './themes/light/header/combo-header.base.css.js';
import { styles as bootstrap } from '../dropdown/themes/light/dropdown-header.bootstrap.css.js';
import { styles as fluent } from '../dropdown/themes/light/dropdown-header.fluent.css.js';

@themes({ bootstrap, fluent })
export default class IgcComboHeaderComponent extends LitElement {
public static readonly tagName: string = 'igc-combo-header';
public static override styles = styles;

protected override render() {
return html`<slot></slot>`;
}
}
declare global {
interface HTMLElementTagNameMap {
'igc-combo-header': IgcComboHeaderComponent;
}
}
67 changes: 67 additions & 0 deletions src/components/combo/combo-item.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { html, LitElement } from 'lit';
import { themes } from '../../theming/theming-decorator.js';
import { styles } from './themes/light/item/combo-item.base.css.js';
import { styles as bootstrap } from '../dropdown/themes/light/dropdown-item.bootstrap.css.js';
import { styles as fluent } from '../dropdown/themes/light/dropdown-item.fluent.css.js';
import { styles as indigo } from '../dropdown/themes/light/dropdown-item.indigo.css.js';
import { property } from 'lit/decorators.js';
import { watch } from '../common/decorators/watch.js';
import IgcCheckboxComopnent from '../checkbox/checkbox.js';
import { defineComponents } from '../common/definitions/defineComponents.js';

defineComponents(IgcCheckboxComopnent);

@themes({ bootstrap, fluent, indigo })
export default class IgcComboItemComponent extends LitElement {
public static readonly tagName: string = 'igc-combo-item';
public static override styles = styles;

@property({ attribute: false })
public index!: number;

/**
* Determines whether the item is selected.
*/
@property({ type: Boolean, reflect: true })
public selected = false;

/**
* Determines whether the item is active.
*/
@property({ type: Boolean, reflect: true })
public active = false;

@watch('selected')
protected selectedChange() {
this.selected
? this.setAttribute('aria-selected', 'true')
: this.removeAttribute('aria-selected');
}

public override connectedCallback() {
super.connectedCallback();
this.setAttribute('role', 'option');
}

protected override render() {
return html`
<section part="prefix">
<igc-checkbox
aria-hidden="true"
?checked=${this.selected}
tabindex="-1"
exportparts="control: checkbox, indicator: checkbox-indicator, checked"
></igc-checkbox>
</section>
<section id="content" part="content">
<slot></slot>
</section>
`;
}
}

declare global {
interface HTMLElementTagNameMap {
'igc-combo-item': IgcComboItemComponent;
}
}
18 changes: 18 additions & 0 deletions src/components/combo/combo-list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { LitVirtualizer } from '@lit-labs/virtualizer';

export default class IgcComboListComponent extends LitVirtualizer {
public static readonly tagName = 'igc-combo-list';
public override scroller = true;

public override connectedCallback() {
super.connectedCallback();
this.setAttribute('tabindex', '0');
this.setAttribute('role', 'listbox');
}
}

declare global {
interface HTMLElementTagNameMap {
'igc-combo-list': IgcComboListComponent;
}
}
Loading