2020-06-04 09:33:57 -04:00
|
|
|
{{#unless selectKit.isHidden}}
|
2020-02-03 08:22:14 -05:00
|
|
|
{{component selectKit.options.headerComponent
|
|
|
|
tabindex=tabindex
|
|
|
|
value=value
|
|
|
|
selectedContent=selectedContent
|
|
|
|
selectKit=selectKit
|
2021-02-15 06:32:09 -05:00
|
|
|
id=(concat selectKit.uniqueID "-header")
|
2017-10-19 15:51:08 -04:00
|
|
|
}}
|
|
|
|
|
2022-06-30 06:30:50 -04:00
|
|
|
<SelectKit::SelectKitBody @selectKit={{selectKit}} @id={{concat selectKit.uniqueID "-body"}}>
|
2021-08-23 04:44:19 -04:00
|
|
|
{{component selectKit.options.filterComponent
|
|
|
|
selectKit=selectKit
|
|
|
|
id=(concat selectKit.uniqueID "-filter")
|
|
|
|
}}
|
|
|
|
|
2021-11-12 08:04:48 -05:00
|
|
|
{{#if selectedContent.length}}
|
2021-08-23 04:44:19 -04:00
|
|
|
<div class="selected-content">
|
|
|
|
{{#each selectedContent as |item|}}
|
|
|
|
{{component selectKit.options.selectedChoiceComponent
|
|
|
|
item=item
|
|
|
|
selectKit=selectKit
|
|
|
|
}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2020-03-09 08:44:34 -04:00
|
|
|
{{#if selectKit.isLoading}}
|
|
|
|
<span class="is-loading">
|
2021-07-21 07:49:21 -04:00
|
|
|
{{#if site}}
|
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{/if}}
|
2020-03-09 08:44:34 -04:00
|
|
|
</span>
|
|
|
|
{{else}}
|
2020-02-03 08:22:14 -05:00
|
|
|
{{#each collections as |collection|}}
|
|
|
|
{{component (component-for-collection collection.identifier selectKit)
|
|
|
|
collection=collection
|
|
|
|
selectKit=selectKit
|
|
|
|
value=value
|
|
|
|
}}
|
|
|
|
{{/each}}
|
2021-08-23 04:44:19 -04:00
|
|
|
|
|
|
|
{{#if selectKit.filter}}
|
|
|
|
{{#if selectKit.hasNoContent}}
|
|
|
|
<span class="no-content" role="alert">
|
|
|
|
{{i18n "select_kit.no_content"}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="results-count" role="alert">
|
|
|
|
{{i18n "select_kit.results_count" count=mainCollection.length}}
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2020-03-09 08:44:34 -04:00
|
|
|
{{/if}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</SelectKit::SelectKitBody>
|
2020-02-03 08:22:14 -05:00
|
|
|
{{/unless}}
|