-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support drag-reordering of dashboard items (#7738)
- Loading branch information
1 parent
176a6cf
commit b5bc352
Showing
12 changed files
with
1,235 additions
and
123 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
|
||
export const hasWidgetWrappers = css` | ||
::slotted(vaadin-dashboard-widget-wrapper) { | ||
display: contents; | ||
} | ||
`; | ||
|
||
export const dashboardWidgetAndSectionStyles = css` | ||
/* Placeholder shown while the widget or section is dragged */ | ||
:host::before { | ||
content: ''; | ||
z-index: 1; | ||
position: absolute; | ||
display: var(--_vaadin-dashboard-item-placeholder-display, none); | ||
inset: 0; | ||
border: 3px dashed black; | ||
border-radius: 5px; | ||
background-color: #fff; | ||
} | ||
header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
#header-actions { | ||
display: var(--_vaadin-dashboard-widget-actions-display, none); | ||
} | ||
#drag-handle::before { | ||
font-size: 30px; | ||
content: '☰'; | ||
cursor: grab; | ||
} | ||
`; |
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
Oops, something went wrong.