* chore: 🤖 remove hashi copyright .github headers and update config * chore: 🤖 remove remaining hashicorp copyright headers * Add missing copyright headers
68 lines
1.8 KiB
Handlebars
68 lines
1.8 KiB
Handlebars
{{!
|
|
Copyright IBM Corp. 2021, 2026
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<Hds::Dropdown
|
|
...attributes
|
|
@height='314px'
|
|
@onClose={{this.close}}
|
|
@listPosition={{@listPosition}}
|
|
as |DD|
|
|
>
|
|
<DD.ToggleButton
|
|
@color='secondary'
|
|
@text={{@toggleText}}
|
|
@count={{@checkedItems.length}}
|
|
{{on 'click' this.open}}
|
|
/>
|
|
{{#if @isSearchable}}
|
|
<DD.Header @hasDivider={{true}}>
|
|
<Hds::Form::TextInput::Base
|
|
@type='search'
|
|
@value={{or this.searchTerm @searchTerm}}
|
|
placeholder={{t 'actions.narrow-results'}}
|
|
aria-label={{t 'actions.narrow-results'}}
|
|
{{on 'input' this.filterItems}}
|
|
data-test-dropdown-search
|
|
/>
|
|
</DD.Header>
|
|
{{/if}}
|
|
|
|
{{#unless (or this.itemOptions @isLoading)}}
|
|
<DD.Description @text={{t 'titles.no-results'}} />
|
|
{{/unless}}
|
|
|
|
{{#if @isLoading}}
|
|
<DD.Generic>
|
|
<Hds::Layout::Flex @align='center' @justify='center'>
|
|
<Hds::Icon @name='loading' @size='24' class='margin-y-xs' />
|
|
</Hds::Layout::Flex>
|
|
</DD.Generic>
|
|
{{else if (has-block)}}
|
|
{{yield DD this.selectItem this.itemOptions}}
|
|
{{else}}
|
|
{{#each this.itemOptions as |itemOption|}}
|
|
<DD.Checkbox
|
|
@value={{itemOption.id}}
|
|
data-test-checkbox={{itemOption.id}}
|
|
checked={{includes itemOption.id @checkedItems}}
|
|
{{on 'change' this.selectItem}}
|
|
>
|
|
{{if itemOption.name itemOption.name itemOption.id}}
|
|
</DD.Checkbox>
|
|
{{/each}}
|
|
{{/if}}
|
|
|
|
{{#unless @isLoading}}
|
|
<DD.Footer @hasDivider={{true}}>
|
|
<Hds::Button
|
|
@text='Apply'
|
|
@isFullWidth={{true}}
|
|
@size='small'
|
|
{{on 'click' (fn this.applyFilter DD.close)}}
|
|
data-test-dropdown-apply-button
|
|
/>
|
|
</DD.Footer>
|
|
{{/unless}}
|
|
</Hds::Dropdown> |