-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
793 additions
and
154 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
56 changes: 56 additions & 0 deletions
56
...ndle/Resources/public/scss/ui/modules/universal-discovery/_selected.items.panel.item.scss
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.c-selected-items-panel-item { | ||
display: flex; | ||
align-items: center; | ||
padding: calculateRem(5px); | ||
margin-bottom: calculateRem(8px); | ||
border: calculateRem(1px) solid $ibexa-color-light; | ||
border-radius: $ibexa-border-radius; | ||
box-shadow: calculateRem(4px) calculateRem(2px) calculateRem(17px) 0 rgba($ibexa-color-black, 0.05); | ||
|
||
&__image-wrapper { | ||
width: calculateRem(42px); | ||
height: calculateRem(42px); | ||
background-color: $ibexa-color-light-300; | ||
border-radius: $ibexa-border-radius-small; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
&__info { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
flex: 1; | ||
width: calculateRem(185px); | ||
padding: 0 calculateRem(15px); | ||
} | ||
|
||
&__info-name { | ||
font-size: $ibexa-text-font-size; | ||
} | ||
|
||
&__info-description { | ||
font-size: $ibexa-text-font-size-small; | ||
color: $ibexa-color-dark-400; | ||
} | ||
|
||
&__actions-wrapper { | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
} | ||
|
||
&__remove-button { | ||
width: calculateRem(32px); | ||
height: calculateRem(32px); | ||
padding: 0; | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
.ibexa-icon { | ||
fill: $ibexa-color-dark; | ||
} | ||
} | ||
} |
75 changes: 75 additions & 0 deletions
75
src/bundle/Resources/public/scss/ui/modules/universal-discovery/_selected.items.panel.scss
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
.c-selected-items-panel { | ||
background-color: $ibexa-color-white; | ||
position: fixed; | ||
top: calc(100vh - calculateRem(98px)); | ||
bottom: calculateRem(31px); | ||
left: calculateRem(16px); | ||
min-height: calculateRem(60px); | ||
border: calculateRem(1px) solid $ibexa-color-light; | ||
border-top-right-radius: $ibexa-border-radius; | ||
border-bottom-right-radius: $ibexa-border-radius; | ||
box-shadow: calculateRem(4px) calculateRem(22px) calculateRem(47px) 0 rgba($ibexa-color-info, 0.15); | ||
z-index: 1; | ||
transition: all $ibexa-admin-transition-duration $ibexa-admin-transition; | ||
|
||
&__header { | ||
display: flex; | ||
justify-content: start; | ||
align-items: center; | ||
padding: calculateRem(16px); | ||
} | ||
|
||
&__selection-counter { | ||
color: $ibexa-color-dark; | ||
font-size: calculateRem(22px); | ||
font-weight: 600; | ||
padding-right: calculateRem(16px); | ||
} | ||
|
||
&--expanded { | ||
bottom: calculateRem(16px); | ||
top: calculateRem(88px); | ||
min-width: calculateRem(491px); | ||
overflow: hidden; | ||
border-top-right-radius: 0; | ||
border-bottom-right-radius: 0; | ||
border-bottom-left-radius: $ibexa-border-radius; | ||
|
||
.c-selected-items-panel { | ||
&__items-wrapper { | ||
display: block; | ||
} | ||
|
||
&__toggle-button-icon { | ||
transform: rotate(0); | ||
} | ||
} | ||
} | ||
|
||
&__items-wrapper { | ||
display: none; | ||
overflow: auto; | ||
padding: 0 calculateRem(38px) calculateRem(16px) calculateRem(22px); | ||
border-top: calculateRem(1px) solid $ibexa-color-light; | ||
height: calc(100% - calculateRem(70px)); | ||
} | ||
|
||
&__actions { | ||
padding: calculateRem(16px) 0; | ||
display: flex; | ||
justify-content: flex-end; | ||
} | ||
|
||
&__toggle-button { | ||
display: flex; | ||
width: calculateRem(32px); | ||
height: calculateRem(32px); | ||
justify-content: center; | ||
align-items: center; | ||
margin-right: calculateRem(32px); | ||
} | ||
|
||
&__toggle-button-icon { | ||
transform: rotate(180deg); | ||
} | ||
} |
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
42 changes: 42 additions & 0 deletions
42
src/bundle/ui-dev/src/modules/universal-discovery/components/filters/filters.panel.js
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import { getTranslator } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper'; | ||
|
||
const FiltersPanel = ({ children, isApplyButtonEnabled, makeSearch, clearFilters }) => { | ||
const Translator = getTranslator(); | ||
const filtersLabel = Translator.trans(/*@Desc("Filters")*/ 'filters.title', {}, 'ibexa_universal_discovery_widget'); | ||
const clearLabel = Translator.trans(/*@Desc("Clear")*/ 'filters.clear', {}, 'ibexa_universal_discovery_widget'); | ||
const applyLabel = Translator.trans(/*@Desc("Apply")*/ 'filters.apply', {}, 'ibexa_universal_discovery_widget'); | ||
|
||
return ( | ||
<div className="c-filters"> | ||
<div className="c-filters__header"> | ||
<div className="c-filters__header-content">{filtersLabel}</div> | ||
<div className="c-filters__header-actions"> | ||
<button className="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small" type="button" onClick={clearFilters}> | ||
{clearLabel} | ||
</button> | ||
<button | ||
type="button" | ||
className="btn ibexa-btn ibexa-btn--secondary ibexa-btn--small ibexa-btn--apply" | ||
onClick={makeSearch} | ||
disabled={!isApplyButtonEnabled} | ||
> | ||
{applyLabel} | ||
</button> | ||
</div> | ||
</div> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
FiltersPanel.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
isApplyButtonEnabled: PropTypes.bool.isRequired, | ||
makeSearch: PropTypes.func.isRequired, | ||
clearFilters: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default FiltersPanel; |
Oops, something went wrong.