-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-ui): implementation of minimap component
ISSUES CLOSED: #758t pu
- Loading branch information
Showing
33 changed files
with
950 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./minimap/minimap.module"; | ||
export * from "./minimap/components"; |
10 changes: 10 additions & 0 deletions
10
packages/stark-ui/src/modules/minimap/assets/translations/en.ts
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,10 @@ | ||
/** | ||
* @ignore | ||
*/ | ||
export const translationsEn: object = { | ||
STARK: { | ||
TABLE: { | ||
TOGGLE_COLUMNS: "Column filters" | ||
} | ||
} | ||
}; |
10 changes: 10 additions & 0 deletions
10
packages/stark-ui/src/modules/minimap/assets/translations/fr.ts
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,10 @@ | ||
/** | ||
* @ignore | ||
*/ | ||
export const translationsFr: object = { | ||
STARK: { | ||
TABLE: { | ||
TOGGLE_COLUMNS: "Filtre colonnes" | ||
} | ||
} | ||
}; |
10 changes: 10 additions & 0 deletions
10
packages/stark-ui/src/modules/minimap/assets/translations/nl.ts
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,10 @@ | ||
/** | ||
* @ignore | ||
*/ | ||
export const translationsNl: object = { | ||
STARK: { | ||
TABLE: { | ||
TOGGLE_COLUMNS: "Kolom filters" | ||
} | ||
} | ||
}; |
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,3 @@ | ||
export * from "./components/minimap.component"; | ||
export * from "./components/item-properties.intf"; | ||
export * from "./components/item-visibility.intf"; |
105 changes: 105 additions & 0 deletions
105
packages/stark-ui/src/modules/minimap/components/_minimap-theme.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,105 @@ | ||
/* ============================================================================== */ | ||
/* S t a r k M i n i m a p */ | ||
/* ============================================================================== */ | ||
/* stark-ui: src/modules/minimap/components/minimap-theme.scss */ | ||
|
||
.custom-minimap { | ||
& .stark-minimap-dots { | ||
& i { | ||
background-color: $secondary-dark-text-color; | ||
opacity: 0.2; | ||
} | ||
& li.selected i { | ||
opacity: 1; | ||
} | ||
} | ||
& .stark-minimap-dropdown-toggle { | ||
& .stark-minimap-dropdown-toggle-menu { | ||
box-shadow: $elevation-4; | ||
& mat-checkbox.mat-checked .mat-icon { | ||
background-color: $md-accent; | ||
} | ||
} | ||
& .mat-button.mat-icon-button { | ||
& svg { | ||
fill: #000; | ||
} | ||
border: 1px solid mat-color($grey-palette, 300); | ||
background-color: $md-primary-alpha-05; | ||
} | ||
& mat-icon { | ||
fill: $md-primary; | ||
} | ||
& .stark-minimap-dropdown-toggle-menu { | ||
border-color: mat-color($grey-palette, 500); | ||
box-shadow: 0 1px 2px mat-color($grey-palette, 300); | ||
background-color: mat-color($grey-palette, 50); | ||
& mat-checkbox { | ||
&:hover { | ||
background: $md-primary-alpha-05; | ||
} | ||
& ._mat-icon { | ||
&::after { | ||
border-color: mat-color($grey-palette, 50); | ||
} | ||
} | ||
& .stark-minimap-dropdown { | ||
& mat-checkbox.stark-minimap-column-checkbox { | ||
&.mat-checked ._mat-icon { | ||
background-color: $md-primary-200-alpha-38; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media #{$desktop-query} { | ||
& .stark-minimap-dropdown-toggle-menu { | ||
font-size: 16px; | ||
& mat-checkbox { | ||
padding: 3px 16px; | ||
& ._mat-container { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
top: 10px; | ||
left: 16px; | ||
} | ||
& ._mat-icon { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
} | ||
& ._mat-label { | ||
width: 100%; | ||
padding: 0 0 0 26px; | ||
font-size: 12px; | ||
& span { | ||
max-width: 400px; | ||
} | ||
} | ||
&.mat-checked ._mat-icon::after { | ||
width: 8px; | ||
height: 10px; | ||
top: 2px; | ||
left: 4px; | ||
} | ||
&:first-child { | ||
margin-top: 8px; | ||
} | ||
&:last-child { | ||
margin-bottom: 8px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.stark-table { | ||
& .stark-minimap { | ||
& .stark-minimap-dropdown-toggle .stark-minimap-dropdown-toggle-menu { | ||
box-shadow: $elevation-2; | ||
} | ||
} | ||
} | ||
|
||
/* End stark-ui: src/modules/minimap/components/minimap-theme.scss */ |
202 changes: 202 additions & 0 deletions
202
packages/stark-ui/src/modules/minimap/components/_minimap.component.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,202 @@ | ||
/* ============================================================================== */ | ||
/* S t a r k M i n i m a p */ | ||
/* ============================================================================== */ | ||
/* stark-ui: src/modules/minimap/components/minimap.component.scss */ | ||
|
||
.custom-minimap { | ||
display: flex; | ||
flex-flow: row wrap; | ||
flex-grow: 1; | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
padding-top: 8px; | ||
margin: 0 15px; | ||
& .stark-minimap-dots { | ||
& ul { | ||
margin: 0 8px 0 0; | ||
padding: 0; | ||
} | ||
& li { | ||
display: inline-block; | ||
margin: 0; | ||
padding: 0 3px 0; | ||
line-height: 18px; | ||
vertical-align: top; | ||
} | ||
& i { | ||
display: inline-block; | ||
width: 4px; | ||
height: 4px; | ||
opacity: 0.2; | ||
} | ||
& li.selected i { | ||
opacity: 1; | ||
} | ||
} | ||
& .stark-minimap-dropdown-toggle { | ||
position: relative; | ||
margin: 0; | ||
padding-top: 0; | ||
& .stark-minimap-dropdown-toggle-menu { | ||
font-size: 14px; | ||
border: 0; | ||
min-width: 180px; | ||
& mat-checkbox .mat-label { | ||
margin-left: 40px; | ||
font-size: 12px; | ||
} | ||
} | ||
& .mat-button.mat-icon-button { | ||
height: auto; | ||
margin: 0; | ||
transform: translateY(-8px); | ||
} | ||
& .mat-icon-button .up { | ||
display: none; | ||
} | ||
&.visible { | ||
& .stark-minimap-dropdown-toggle-menu { | ||
display: block; | ||
} | ||
& .down { | ||
display: none; | ||
} | ||
& .up { | ||
display: inline-block; | ||
} | ||
} | ||
& .stark-minimap-dropdown-toggle-button { | ||
min-height: 0; | ||
margin: 0; | ||
padding: 0 2px 0 0; | ||
} | ||
& .stark-minimap-dropdown-toggle-menu { | ||
position: absolute; | ||
z-index: 1; | ||
top: 27px; | ||
right: 0; | ||
display: none; | ||
padding: 0; | ||
border-radius: 2px; | ||
font-size: 16px; | ||
& mat-checkbox { | ||
display: block; | ||
min-width: 0; | ||
min-height: 0; | ||
margin: 0; | ||
padding: 4px 8px 5px; | ||
& ._mat-container { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
top: 13px; | ||
left: 8px; | ||
} | ||
& ._mat-icon { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
top: 5px; | ||
} | ||
& ._mat-label { | ||
width: 100%; | ||
margin: 0; | ||
padding: 0 0 0 20px; | ||
& span { | ||
display: block; | ||
max-width: 260px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
} | ||
&.mat-checked ._mat-icon::after { | ||
width: 6px; | ||
height: 8px; | ||
top: 3px; | ||
left: 4px; | ||
} | ||
&:first-child { | ||
margin-top: 4px; | ||
} | ||
&:last-child { | ||
margin-bottom: 4px; | ||
} | ||
} | ||
& .stark-minimap-dropdown { | ||
& .mat-container { | ||
left: 16px; | ||
} | ||
& mat-checkbox.stark-minimap-column-checkbox { | ||
& ._mat-icon { | ||
border-width: 1px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media #{$desktop-query} { | ||
& .stark-minimap-dropdown-toggle-menu { | ||
font-size: 16px; | ||
& mat-checkbox { | ||
padding: 3px 16px; | ||
& ._mat-container { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
top: 10px; | ||
left: 16px; | ||
} | ||
& ._mat-icon { | ||
width: $checkbox-size; | ||
height: $checkbox-size; | ||
} | ||
& ._mat-label { | ||
width: 100%; | ||
padding: 0 0 0 26px; | ||
font-size: 12px; | ||
& span { | ||
max-width: 400px; | ||
} | ||
} | ||
&.mat-checked ._mat-icon::after { | ||
width: 8px; | ||
height: 10px; | ||
top: 2px; | ||
left: 4px; | ||
} | ||
&:first-child { | ||
margin-top: 8px; | ||
} | ||
&:last-child { | ||
margin-bottom: 8px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
.stark-table { | ||
& .stark-minimap-dropdown-toggle-menu { | ||
padding-right: 16px; | ||
} | ||
& .stark-table-action-bar { | ||
& .stark-minimap-dropdown-toggle-button { | ||
& mat-icon { | ||
width: 20px; | ||
height: 20px; | ||
} | ||
} | ||
} | ||
& .stark-minimap { | ||
padding-top: 0; | ||
& .stark-minimap-dropdown-toggle .mat-button.mat-icon-button { | ||
transform: none; | ||
} | ||
& .stark-minimap-dropdown-toggle .stark-minimap-dropdown-toggle-menu { | ||
font-size: 14px; | ||
border: 0; | ||
min-width: 180px; | ||
} | ||
} | ||
} | ||
|
||
/* END stark-ui: src/modules/minimap/components/minimap.component.scss */ |
14 changes: 14 additions & 0 deletions
14
packages/stark-ui/src/modules/minimap/components/item-properties.intf.ts
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,14 @@ | ||
/** | ||
* Represents the properties of an item inside the Stark Minimap component. | ||
*/ | ||
export interface StarkMinimapItemProperties { | ||
/** | ||
* The name of the item | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* The label of the item (optional). If not provided, then the name of the item will be used. | ||
*/ | ||
label?: string; | ||
} |
Oops, something went wrong.