2020-06-04 21:33:57 +08:00
|
|
|
{{#unless selectKit.isHidden}}
|
2020-02-03 21:22:14 +08:00
|
|
|
{{component selectKit.options.headerComponent
|
|
|
|
tabindex=tabindex
|
|
|
|
value=value
|
|
|
|
selectedContent=selectedContent
|
|
|
|
selectKit=selectKit
|
2021-02-15 19:32:09 +08:00
|
|
|
id=(concat selectKit.uniqueID "-header")
|
2017-10-20 03:51:08 +08:00
|
|
|
}}
|
|
|
|
|
2022-06-30 18:30:50 +08:00
|
|
|
<SelectKit::SelectKitBody @selectKit={{selectKit}} @id={{concat selectKit.uniqueID "-body"}}>
|
2021-08-23 16:44:19 +08:00
|
|
|
{{component selectKit.options.filterComponent
|
|
|
|
selectKit=selectKit
|
|
|
|
id=(concat selectKit.uniqueID "-filter")
|
|
|
|
}}
|
2020-02-03 21:22:14 +08:00
|
|
|
|
2020-03-09 20:44:34 +08:00
|
|
|
{{#if selectKit.isLoading}}
|
|
|
|
<span class="is-loading">
|
|
|
|
{{#if site}}
|
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
2020-02-03 21:22:14 +08:00
|
|
|
{{#each collections as |collection|}}
|
|
|
|
{{component (component-for-collection collection.identifier selectKit)
|
|
|
|
collection=collection
|
|
|
|
selectKit=selectKit
|
|
|
|
value=value
|
|
|
|
}}
|
|
|
|
{{/each}}
|
2021-08-23 16:44:19 +08: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 20:44:34 +08:00
|
|
|
{{/if}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</SelectKit::SelectKitBody>
|
2020-02-03 21:22:14 +08:00
|
|
|
{{/unless}}
|