mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
@@ -1,3 +1,6 @@
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { unsafeCSS } from 'lit';
|
||||
|
||||
export const dataViewCssVariable = () => {
|
||||
return `
|
||||
--data-view-cell-text-size:14px;
|
||||
@@ -41,7 +44,7 @@ export const dataViewCommonStyle = (selector: string) => `
|
||||
fill: var(--affine-icon-color);
|
||||
}
|
||||
.dv-border{
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
.dv-round-4{
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -7,7 +7,8 @@ import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { InvisibleIcon, ViewIcon } from '@blocksuite/icons/lit';
|
||||
import { computed } from '@preact/signals-core';
|
||||
import { css, html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, unsafeCSS } from 'lit';
|
||||
import { property, query } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -33,7 +34,7 @@ export class DataViewPropertiesSettingView extends SignalWatcher(
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid var(--affine-divider-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.properties-group-title {
|
||||
|
||||
@@ -323,10 +323,6 @@ export abstract class SingleViewBase<
|
||||
}
|
||||
|
||||
cellValueGet(rowId: string, propertyId: string): unknown {
|
||||
const type = this.propertyTypeGet(propertyId);
|
||||
if (!type) {
|
||||
return;
|
||||
}
|
||||
return this.dataSource.cellValueGet(rowId, propertyId);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { CenterPeekIcon, MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||
import { css } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
import { property, state } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -18,7 +19,7 @@ const styles = css`
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
border: 0.5px solid var(--affine-border-color);
|
||||
border: 0.5px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 8px;
|
||||
background-color: var(--affine-background-kanban-card-color);
|
||||
@@ -36,7 +37,7 @@ const styles = css`
|
||||
}
|
||||
|
||||
.mobile-card-header.has-divider {
|
||||
border-bottom: 0.5px solid var(--affine-border-color);
|
||||
border-bottom: 0.5px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.mobile-card-header-title {
|
||||
|
||||
@@ -2,7 +2,8 @@ import { popupTargetFromElement } from '@blocksuite/affine-components/context-me
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { CenterPeekIcon, MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||
import { css } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
import { property, state } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -17,7 +18,7 @@ const styles = css`
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.05);
|
||||
border-radius: 8px;
|
||||
transition: background-color 100ms ease-in-out;
|
||||
@@ -40,7 +41,7 @@ const styles = css`
|
||||
}
|
||||
|
||||
.card-header.has-divider {
|
||||
border-bottom: 0.5px solid var(--affine-border-color);
|
||||
border-bottom: 0.5px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
affine-data-view-kanban-card .card-header-title {
|
||||
|
||||
@@ -6,7 +6,8 @@ import {
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { PlusIcon } from '@blocksuite/icons/lit';
|
||||
import { css, html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, unsafeCSS } from 'lit';
|
||||
import { property, query } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
|
||||
@@ -28,7 +29,7 @@ const styles = css`
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.data-view-table-group-add-row-button {
|
||||
|
||||
@@ -3,7 +3,8 @@ import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { CenterPeekIcon, MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||
import { css, nothing } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, nothing, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
@@ -21,7 +22,7 @@ export class MobileTableRow extends SignalWatcher(
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
position: relative;
|
||||
min-height: 34px;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ import {
|
||||
import type { InsertToPosition } from '@blocksuite/affine-shared/utils';
|
||||
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
|
||||
import { AddCursorIcon } from '@blocksuite/icons/lit';
|
||||
import { css } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { html } from 'lit/static-html.js';
|
||||
@@ -41,7 +42,7 @@ export class MobileDataViewTable extends DataViewBase<
|
||||
.cell-divider {
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background-color: var(--affine-border-color);
|
||||
background-color: ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { PlusIcon } from '@blocksuite/icons/lit';
|
||||
import { effect } from '@preact/signals-core';
|
||||
import { css, html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, unsafeCSS } from 'lit';
|
||||
import { property, query } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
|
||||
@@ -39,7 +40,7 @@ const styles = css`
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
padding: 4px 8px;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { css } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
@@ -29,7 +30,9 @@ export class DataViewColumnPreview extends SignalWatcher(
|
||||
const columnIndex = this.tableViewManager.propertyIndexGet(this.column.id);
|
||||
return html`
|
||||
<div
|
||||
style="background-color: var(--affine-background-primary-color);border-top: 1px solid var(--affine-border-color);box-shadow: var(--affine-shadow-2);"
|
||||
style="background-color: var(--affine-background-primary-color);border-top: 1px solid ${unsafeCSS(
|
||||
cssVarV2.layer.insideBorder.border
|
||||
)};box-shadow: var(--affine-shadow-2);"
|
||||
>
|
||||
<affine-database-header-column
|
||||
.tableViewManager="${this.tableViewManager}"
|
||||
@@ -43,7 +46,9 @@ export class DataViewColumnPreview extends SignalWatcher(
|
||||
height: height + 'px',
|
||||
});
|
||||
return html`<div
|
||||
style="border-top: 1px solid var(--affine-border-color)"
|
||||
style="border-top: 1px solid ${unsafeCSS(
|
||||
cssVarV2.layer.insideBorder.border
|
||||
)}"
|
||||
>
|
||||
<div style="${style}">
|
||||
<affine-database-cell-container
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { css, html, LitElement } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, LitElement, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
|
||||
import type { Property } from '../../../../core/view-manager/property.js';
|
||||
@@ -83,7 +84,7 @@ export class DatabaseNumberFormatBar extends WithDisposable(LitElement) {
|
||||
.divider {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: var(--affine-border-color);
|
||||
background-color: ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
||||
import { baseTheme } from '@toeverything/theme';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
|
||||
import {
|
||||
@@ -19,8 +20,8 @@ export const styles = css`
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-top: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
border-top: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
background-color: var(--affine-background-primary-color);
|
||||
@@ -108,7 +109,7 @@ export const styles = css`
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: var(--affine-white);
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
border-radius: 4px;
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -125,7 +126,7 @@ export const styles = css`
|
||||
|
||||
.affine-database-column-text-save-icon:hover {
|
||||
background: var(--affine-white);
|
||||
border-color: var(--affine-border-color);
|
||||
border-color: ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.affine-database-column-text-icon svg {
|
||||
@@ -195,7 +196,7 @@ export const styles = css`
|
||||
}
|
||||
|
||||
.affine-database-column-type-menu-icon {
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
border-radius: 4px;
|
||||
padding: 5px;
|
||||
background-color: var(--affine-background-secondary-color);
|
||||
|
||||
@@ -2,7 +2,8 @@ import { popupTargetFromElement } from '@blocksuite/affine-components/context-me
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import { CenterPeekIcon, MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||
import { css, nothing } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, nothing, unsafeCSS } from 'lit';
|
||||
import { property } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
@@ -40,7 +41,7 @@ export class TableRow extends SignalWatcher(WithDisposable(ShadowlessElement)) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid var(--affine-border-color);
|
||||
border-bottom: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import {
|
||||
popupTargetFromElement,
|
||||
} from '@blocksuite/affine-components/context-menu';
|
||||
import { AddCursorIcon } from '@blocksuite/icons/lit';
|
||||
import { css } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, unsafeCSS } from 'lit';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { html } from 'lit/static-html.js';
|
||||
@@ -119,7 +120,7 @@ const styles = css`
|
||||
.cell-divider {
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
background-color: var(--affine-border-color);
|
||||
background-color: ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.data-view-table-left-bar {
|
||||
|
||||
@@ -16,7 +16,8 @@ import {
|
||||
PlusIcon,
|
||||
} from '@blocksuite/icons/lit';
|
||||
import { computed, type ReadonlySignal } from '@preact/signals-core';
|
||||
import { css, html, nothing, type TemplateResult } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { css, html, nothing, type TemplateResult, unsafeCSS } from 'lit';
|
||||
import { property, state } from 'lit/decorators.js';
|
||||
import { classMap } from 'lit/directives/class-map.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -162,17 +163,17 @@ export class FilterGroupView extends SignalWatcher(ShadowlessElement) {
|
||||
}
|
||||
|
||||
.filter-group-border {
|
||||
border: 1px dashed var(--affine-border-color);
|
||||
border: 1px dashed ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.filter-group-bg-1 {
|
||||
background-color: var(--affine-background-secondary-color);
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.filter-group-bg-2 {
|
||||
background-color: var(--affine-background-tertiary-color);
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
}
|
||||
|
||||
.hover-style {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { PlusIcon } from '@blocksuite/icons/lit';
|
||||
import { html } from 'lit';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import { html, unsafeCSS } from 'lit';
|
||||
|
||||
export class NewRecordPreview extends ShadowlessElement {
|
||||
override render() {
|
||||
@@ -15,7 +16,7 @@ export class NewRecordPreview extends ShadowlessElement {
|
||||
left: 0;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
border: 1px solid var(--affine-border-color);
|
||||
border: 1px solid ${unsafeCSS(cssVarV2.layer.insideBorder.border)};
|
||||
border-radius: 50%;
|
||||
background: var(--affine-blue-100);
|
||||
box-shadow:
|
||||
|
||||
Reference in New Issue
Block a user