* chore: upgrade to tiptap v3 * chore: update starter kit * chore: tippy to floating-ui migration for mentions * chore: update remaining floating menus * chore: update setEditorValue function * fix: potential bugs * chore: extract out common floating ui positioning logic * fix: storage api * fix: bubble menu * fix: type errors * fix: type errors * chore: upgrade tiptap-markdown package * fix: mentions close callback * chore: update bubbling sequence * chore: update package.json * chore: update tiptap catalogs * fix: add error handling * fix: file plugin types * chore: update live package.json * fix: broken lock file --------- Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com> Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
216 lines
4.4 KiB
CSS
216 lines
4.4 KiB
CSS
.table-wrapper {
|
|
overflow-x: auto;
|
|
padding-bottom: 26px;
|
|
|
|
table {
|
|
position: relative;
|
|
border-collapse: collapse;
|
|
table-layout: fixed;
|
|
margin: 0.5rem 0 0 0;
|
|
border: 1px solid rgba(var(--color-border-200));
|
|
width: 100%;
|
|
|
|
td,
|
|
th {
|
|
min-width: 1em;
|
|
border: 1px solid rgba(var(--color-border-300));
|
|
padding: 7px 10px;
|
|
vertical-align: top;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
transition: background-color 0.3s ease;
|
|
|
|
> * {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Selected cell outline */
|
|
&.selectedCell:not(.content-hidden) {
|
|
user-select: none;
|
|
|
|
&::after {
|
|
position: absolute;
|
|
content: "";
|
|
top: -1px;
|
|
left: -1px;
|
|
height: calc(100% + 2px);
|
|
width: calc(100% + 2px);
|
|
}
|
|
|
|
&.selectedCell-border-top::after {
|
|
border-top: 2px solid rgba(var(--color-primary-100));
|
|
}
|
|
|
|
&.selectedCell-border-left::after {
|
|
border-left: 2px solid rgba(var(--color-primary-100));
|
|
}
|
|
|
|
&.selectedCell-border-bottom::after {
|
|
border-bottom: 2px solid rgba(var(--color-primary-100));
|
|
}
|
|
|
|
&.selectedCell-border-right::after {
|
|
border-right: 2px solid rgba(var(--color-primary-100));
|
|
}
|
|
}
|
|
/* End selected cell outline */
|
|
|
|
.table-col-handle-container,
|
|
.table-row-handle-container {
|
|
& > button {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
.table-col-handle-container,
|
|
.table-row-handle-container {
|
|
& > button {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.ProseMirror-widget + * {
|
|
padding-top: 0 !important;
|
|
}
|
|
|
|
&.content-hidden > * {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
|
|
th {
|
|
font-weight: 500;
|
|
text-align: left;
|
|
}
|
|
|
|
tr[background="none"],
|
|
tr:not([background]) {
|
|
th {
|
|
background-color: rgba(var(--color-background-90));
|
|
}
|
|
}
|
|
|
|
.table-drop-marker {
|
|
background-color: rgba(var(--color-primary-100));
|
|
position: absolute;
|
|
z-index: 10;
|
|
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.table-col-drag-marker,
|
|
.table-row-drag-marker {
|
|
position: absolute;
|
|
z-index: 10;
|
|
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.table-col-drag-marker {
|
|
top: -9px;
|
|
}
|
|
|
|
.table-row-drag-marker {
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
/* Selected status */
|
|
&.ProseMirror-selectednode {
|
|
table {
|
|
background-color: rgba(var(--color-primary-100), 0.2);
|
|
}
|
|
}
|
|
/* End selected status */
|
|
}
|
|
|
|
/* Column resizer */
|
|
.table-wrapper table .column-resize-handle {
|
|
position: absolute;
|
|
right: -1px;
|
|
top: -1px;
|
|
width: 2px;
|
|
height: calc(100% + 2px);
|
|
z-index: 5;
|
|
background-color: rgba(var(--color-primary-100));
|
|
pointer-events: none;
|
|
}
|
|
/* End column resizer */
|
|
|
|
.resize-cursor .table-wrapper .table-controls .rows-control,
|
|
.table-wrapper.controls--disabled .table-controls .rows-control,
|
|
.resize-cursor .table-wrapper .table-controls .columns-control,
|
|
.table-wrapper.controls--disabled .table-controls .columns-control {
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Insert buttons */
|
|
.table-wrapper {
|
|
.table-column-insert-button,
|
|
.table-row-insert-button {
|
|
position: absolute;
|
|
background-color: rgba(var(--color-background-90));
|
|
color: rgba(var(--color-text-300));
|
|
border: 1px solid rgba(var(--color-border-200));
|
|
border-radius: 4px;
|
|
display: grid;
|
|
place-items: center;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
outline: none;
|
|
z-index: 10;
|
|
transition: all 0.2s ease;
|
|
|
|
&:hover {
|
|
background-color: rgba(var(--color-background-80));
|
|
color: rgba(var(--color-text-100));
|
|
}
|
|
|
|
&.dragging {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
background-color: rgba(var(--color-primary-100), 0.2);
|
|
color: rgba(var(--color-text-100));
|
|
}
|
|
|
|
svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
}
|
|
|
|
.table-column-insert-button {
|
|
top: 0;
|
|
right: -16px;
|
|
width: 16px;
|
|
height: 100%;
|
|
transform: translateX(50%);
|
|
cursor: col-resize;
|
|
}
|
|
|
|
.table-row-insert-button {
|
|
bottom: -16px;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 16px;
|
|
transform: translateY(50%);
|
|
cursor: row-resize;
|
|
}
|
|
|
|
/* Show buttons on table hover */
|
|
&:hover {
|
|
.table-column-insert-button,
|
|
.table-row-insert-button {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
}
|
|
}
|
|
/* End insert buttons */
|