-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from fleetbase/feature/patch-sidebar-content-p…
…anel-args added all arguments available from `<ContentPanel />` to be available…
- Loading branch information
Showing
9 changed files
with
208 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,58 @@ | ||
<a href="javascript:;" class="next-nav-item {{if this.active 'active'}}" {{on "click" this.onClick}} ...attributes> | ||
<a href="javascript:;" class="next-nav-item {{if this.active 'active'}} {{if @dropdownButton 'next-nav-item-with-dropdown'}}" {{on "click" this.onClick}} ...attributes> | ||
<div class="next-nav-item-icon-container {{@iconWrapperClass}}"> | ||
{{#if @icon}} | ||
<FaIcon @prefix={{@iconPrefix}} @icon={{@icon}} @size={{or @iconSize "xs"}} class={{@iconClass}} /> | ||
{{/if}} | ||
</div> | ||
<div class="truncate w-10/12 {{@itemWrapperClass}}">{{yield}}</div> | ||
<div class="next-nav-item-right-side {{@itemRightSideContainerClass}}"> | ||
{{#if @rightSideComponent}} | ||
{{component @rightSideComponent context=@rightSideComponentContext}} | ||
{{else}} | ||
{{#if @rightSideStatus}} | ||
<span class="ml-2 {{@rightSideStatusContainerClass}}"> | ||
{{#if @rightSideStatusText}} | ||
<Badge @status={{@rightSideStatus}} @hideStatusDot={{@hideRightSideStatusDot}} class={{@rightSideStatusClass}} @disableHumanize={{@disableRightSideStatusHumanize}}> | ||
{{@rightSideStatusText}} | ||
</Badge> | ||
{{else}} | ||
<Badge @status={{@rightSideStatus}} @hideStatusDot={{@hideRightSideStatusDot}} class={{@rightSideStatusClass}} @disableHumanize={{@disableRightSideStatusHumanize}} /> | ||
{{/if}} | ||
</span> | ||
{{/if}} | ||
{{#if @dropdownButton}} | ||
<DropdownButton @icon={{or @dropdownButtonIcon "ellipsis"}} @iconPrefix={{@dropdownButtonIconPrefix}} @text={{@dropdownButtonText}} @size="xs" @horizontalPosition="left" @calculatePosition={{@dropdownButtonCalculatePosition}} @renderInPlace={{or @dropdownButtonRenderInPlace true}} @wrapperClass={{concat @dropdownButtonWrapperClass " " "next-nav-item-dropdown-button"}} @triggerClass={{@dropdownButtonTriggerClass}} @registerAPI={{@registerAPI}} @onInsert={{this.onInsert}} as |dd|> | ||
<div class="next-dd-menu mt-0i" role="menu" aria-orientation="vertical" aria-labelledby="user-menu"> | ||
{{#if @dropdownButtonMenuLabel}} | ||
<div class="px-1"> | ||
<div class="text-sm flex flex-row items-center px-3 py-1 rounded-md my-1 text-gray-800 dark:text-gray-300"> | ||
{{@dropdownButtonMenuLabel}} | ||
</div> | ||
</div> | ||
<div class="next-dd-menu-seperator"></div> | ||
{{/if}} | ||
{{#each @dropdownButtonActions as |action|}} | ||
{{#if action.separator}} | ||
<div class="next-dd-menu-seperator"></div> | ||
{{else}} | ||
{{#if (is-dd-item-visible action.context action.isVisible)}} | ||
<div role="group" class="px-1"> | ||
{{!-- template-lint-disable no-nested-interactive --}} | ||
<a href="javascript:;" role="menuitem" class="next-dd-item {{action.class}}" {{on "click" (fn this.onDropdownItemClick action dd)}}> | ||
{{#if action.icon}} | ||
<span class="mr-1"> | ||
<FaIcon class={{action.iconClass}} @icon={{action.icon}} @prefix={{action.iconPrefix}} /> | ||
</span> | ||
{{/if}} | ||
{{action.label}} | ||
</a> | ||
</div> | ||
{{/if}} | ||
{{/if}} | ||
{{/each}} | ||
</div> | ||
</DropdownButton> | ||
{{/if}} | ||
{{/if}} | ||
</div> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<ContentPanel @title={{@title}} @open={{@open}} @wrapperClass="next-sidebar-panel-container {{@wrapperClass}}" @containerClass="next-sidebar-panel {{@containerClass}}" @panelHeaderClass="next-sidebar-panel-toggle {{@panelHeaderClass}}"> | ||
<ContentPanel @title={{@title}} @open={{@open}} @wrapperClass="next-sidebar-panel-container {{@wrapperClass}}" @containerClass="next-sidebar-panel {{@containerClass}}" @panelHeaderClass="next-sidebar-panel-toggle {{@panelHeaderClass}}" @prefixTitle={{@prefixTitle}} @titleComponent={{@titleComponent}} @titleComponentContext={{@titleComponentContext}} @titleContainerClass={{@titleContainerClass}} @panelTitleClass={{@panelTitleClass}} @titleStatusRight={{@titleStatusRight}} @titleStatusRightText={{@titleStatusRightText}} @titleStatusRightContainerClass={{@titleStatusRightContainerClass}} @hideRightTitleStatusDot={{@hideRightTitleStatusDot}} @titleStatusRightClass={{concat "next-content-panel-status-badge" " " @titleStatusRightClass}} @disableTitleStatusRightHumanize={{@disableTitleStatusRightHumanize}} @prefixTitleRight={{@prefixTitleRight}} @prefixTitleRightContainerClass={{@prefixTitleRightContainerClass}} @prefixTitleRightClass={{@prefixTitleRightClass}} @titleRightSideComponent={{@titleRightSideComponent}} @titleRightSideComponentContext={{@titleRightSideComponentContext}} @actionButtons={{@actionButtons}} @dropdownButton={{@dropdownButton}} @dropdownButtonActions={{@dropdownButtonActions}} @dropdownButtonIcon={{@dropdownButtonIcon}} @dropdownButtonIconPrefix={{@dropdownButtonIconPrefix}} @dropdownButtonText={{@dropdownButtonText}} @dropdownButtonCalculatePosition={{@dropdownButtonCalculatePosition}} @dropdownButtonRenderInPlace={{@dropdownButtonRenderInPlace}} @dropdownButtonMenuLabel={{@dropdownButtonMenuLabel}} ...attributes> | ||
{{yield}} | ||
</ContentPanel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters