diff --git a/packages/presentation/lang/en.json b/packages/presentation/lang/en.json index 91446c56592..4a22045f4c2 100644 --- a/packages/presentation/lang/en.json +++ b/packages/presentation/lang/en.json @@ -14,17 +14,16 @@ "AddSocialLinks": "Add social links", "EditSocialLinks": "Edit social links", "Change": "Change", - "Remove": "Remove", + "Remove": "Remove", "Search": "Search...", - "Spaces": "Spaces", - "CreateMore": "Create more", + "Spaces": "Spaces", "NumberSpaces": "{count, plural, =0 {In} =1 {In 1 place} other {In # places}}", "InThis": "In this {space}", "NoMatchesInThis": "No matches in this {space}", "NoMatchesFound": "No matches found", "NotInThis": "Not in this {space}", "Add": "Add", - "Edit": "Edit", + "Edit": "Edit", "DocumentPreview": "Preview", "MakePrivate": "Make private", "MakePrivateDescription": "Only members can see it" diff --git a/packages/presentation/lang/ru.json b/packages/presentation/lang/ru.json index 346ee9e09c5..2bf9f0718af 100644 --- a/packages/presentation/lang/ru.json +++ b/packages/presentation/lang/ru.json @@ -16,8 +16,7 @@ "Change": "Изменить", "Remove": "Удалить", "Search": "Поиск...", - "Spaces": "Пространства", - "CreateMore": "Создать еще", + "Spaces": "Пространства", "NumberSpaces": "{count, plural, =0 {В} =1 {В 1 месте} other {В # местах}}", "InThis": "В этом {space}", "NoMatchesInThis": "В этом {space} совпадения не обнаружены", diff --git a/packages/presentation/src/components/Card.svelte b/packages/presentation/src/components/Card.svelte index bc406f2c0a1..893bec0ac43 100644 --- a/packages/presentation/src/components/Card.svelte +++ b/packages/presentation/src/components/Card.svelte @@ -15,7 +15,7 @@ --> - + diff --git a/packages/presentation/src/plugin.ts b/packages/presentation/src/plugin.ts index 1d885c41869..4b876c7c1a3 100644 --- a/packages/presentation/src/plugin.ts +++ b/packages/presentation/src/plugin.ts @@ -46,7 +46,6 @@ export default plugin(presentationId, { Remove: '' as IntlString, Search: '' as IntlString, Spaces: '' as IntlString, - CreateMore: '' as IntlString, NumberMembers: '' as IntlString, NumberSpaces: '' as IntlString, InThis: '' as IntlString, diff --git a/packages/text-editor/src/components/CollaborationDiffViewer.svelte b/packages/text-editor/src/components/CollaborationDiffViewer.svelte index f4cb899a0ba..147c80c60da 100644 --- a/packages/text-editor/src/components/CollaborationDiffViewer.svelte +++ b/packages/text-editor/src/components/CollaborationDiffViewer.svelte @@ -130,7 +130,7 @@ max-height: inherit !important; outline: none; line-height: 150%; - color: var(--accent-color); + color: var(--theme-caption-color); p:not(:last-child) { margin-block-end: 1em; @@ -148,10 +148,13 @@ p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; - color: var(--dark-color); + color: var(--theme-halfcontent-color); pointer-events: none; height: 0; } + &:focus-within p.is-editor-empty:first-child::before { + color: var(--theme-trans-color); + } &::-webkit-scrollbar-thumb { background-color: var(--scrollbar-bar-color); @@ -166,14 +169,6 @@ margin: 0; } } - /* Placeholder (at the top) */ - .ProseMirror p.is-editor-empty:first-child::before { - color: #adb5bd; - content: attr(data-placeholder); - float: left; - height: 0; - pointer-events: none; - } .lint-icon { display: inline-block; @@ -227,7 +222,7 @@ } .code-block { - border: 1px solid var(--divider-color); + border: 1px solid var(--theme-divider-color); border-radius: 4px; padding: 0.5rem; } diff --git a/packages/text-editor/src/components/StyledTextArea.svelte b/packages/text-editor/src/components/StyledTextArea.svelte index 2e78790cdb5..139fb9d594c 100644 --- a/packages/text-editor/src/components/StyledTextArea.svelte +++ b/packages/text-editor/src/components/StyledTextArea.svelte @@ -12,7 +12,7 @@ export let showButtons = true export let buttonSize: IconSize = 'small' export let focus = false - export let emphasized: boolean = false + export let kind: 'normal' | 'emphasized' | 'indented' = 'normal' export let isScrollable: boolean = false export let maxHeight: 'max' | 'card' | 'limited' | string | undefined = undefined export let required = false @@ -49,8 +49,9 @@
{ textEditor?.focus() }} diff --git a/packages/text-editor/src/components/StyledTextBox.svelte b/packages/text-editor/src/components/StyledTextBox.svelte index dd595a816fe..b417ea6d805 100644 --- a/packages/text-editor/src/components/StyledTextBox.svelte +++ b/packages/text-editor/src/components/StyledTextBox.svelte @@ -22,7 +22,7 @@ export let content: string export let placeholder: IntlString = textEditorPlugin.string.EditorPlaceholder - export let emphasized: boolean = false + export let kind: 'normal' | 'emphasized' | 'indented' = 'normal' export let alwaysEdit: boolean = false export let showButtons: boolean = true export let hideAttachments: boolean = false @@ -133,8 +133,9 @@
{ if (alwaysEdit && focused) { textEditor?.focus() @@ -230,9 +231,7 @@ .label { padding-bottom: 0.25rem; - font-size: 0.75rem; - color: var(--caption-color); - opacity: 0.3; + color: var(--theme-halfcontent-color); transition: top 200ms; pointer-events: none; user-select: none; diff --git a/packages/text-editor/src/components/StyledTextEditor.svelte b/packages/text-editor/src/components/StyledTextEditor.svelte index a6fad53f0ed..1d73846ee15 100644 --- a/packages/text-editor/src/components/StyledTextEditor.svelte +++ b/packages/text-editor/src/components/StyledTextEditor.svelte @@ -80,6 +80,7 @@ let textEditor: TextEditor let isEmpty = true + let contentHeight: number export function submit (): void { textEditor.submit() @@ -551,7 +552,13 @@
{/if}
-
+
32} + style="--texteditor-maxheight: {varsStyle};" + > {#if isScrollable} *:not(:first-child) { margin-left: .75rem; } &.reverse > *:not(:last-child) { margin-right: .75rem; } } +.gap-4 { + &:not(.reverse) > *:not(:first-child) { margin-left: 1rem; } + &.reverse > *:not(:last-child) { margin-right: 1rem; } +} +.gapV-4 > *:not(:last-child) { margin-bottom: 1rem; } .gap-around-2 > * { margin: .25rem; } .gap-around-4 > * { margin: .5rem; } @@ -491,6 +497,7 @@ input.search { .m--1 { margin: -.25rem; } .m-0-5 { margin: .125rem; } .m-1 { margin: .25rem; } +.m-3 { margin: .75rem; } .pl-1 { padding-left: .25rem; } .pl-2 { padding-left: .5rem; } @@ -613,6 +620,7 @@ input.search { .w-full { width: 100%; } .w-2 { width: .5rem; } .w-4 { width: 1rem; } +.w-6 { width: 1.5rem; } .w-9 { width: 2.25rem; } .w-14 { width: 3.5rem; } .w-16 { width: 4rem; } @@ -641,6 +649,7 @@ input.search { .max-w-2 { max-width: .5rem; } .max-w-4 { max-width: 1rem; } .max-w-9 { max-width: 2.25rem; } +.max-w-20 { max-width: 5rem; } .max-w-30 { max-width: 7.5rem; } .max-w-40 { max-width: 10rem; } .max-w-60 { max-width: 15rem; } @@ -843,9 +852,9 @@ a.no-line { &:hover { background-color: var(--scrollbar-bar-hover); } } .scroll-divider-color::-webkit-scrollbar-thumb { - background-color: var(--divider-color); + background-color: var(--theme-divider-color); &:horizontal { border-radius: .25rem .25rem 0 0; } - &:hover { background-color: var(--popup-bg-hover); } + &:hover { background-color: var(--theme-popup-hover); } } /* Backgrounds & Colors */ diff --git a/packages/theme/styles/button.scss b/packages/theme/styles/button.scss index feb674ca54b..c8c37a87577 100644 --- a/packages/theme/styles/button.scss +++ b/packages/theme/styles/button.scss @@ -2,7 +2,7 @@ display: flex; align-items: center; flex-shrink: 0; - padding: 0 0.625rem; + padding: 0 0.75rem; min-width: 1.375rem; white-space: nowrap; color: var(--theme-caption-color); @@ -11,6 +11,12 @@ transition-property: border, background-color, color, box-shadow; transition-duration: 0.15s; + &.iconL:not(.iconR) { + padding: 0 1rem 0 0.75rem; + } + &.iconR:not(.iconL) { + padding: 0 0.75rem 0 1rem; + } &.accent { font-weight: 500; } @@ -26,10 +32,10 @@ pointer-events: none; } &:not(.only-icon) .btn-icon:not(.spinner) { - margin-right: 0.5rem; + margin-right: 0.375rem; } &:not(.only-icon) .btn-right-icon { - margin-left: 0.5rem; + margin-left: 0.375rem; } &.no-border:not(.only-icon) .btn-icon, &.link-bordered:not(.only-icon) .btn-icon, @@ -39,7 +45,7 @@ } &.short { - max-width: 7rem; + max-width: 8.5rem; } &.sh-no-shape { border-radius: 0.25rem; diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index 7555f8cc7ea..a8771bfe4c2 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -424,6 +424,17 @@ // Replacing the background of a text editor in Activity .activity-content .ref-container .textInput { background-color: var(--body-color) !important; } +// Indented +.antiIndented { + margin: .75rem; + border-radius: .25rem; + + &:hover, + &.focusable:focus-within { + border-color: var(--theme-divider-color); + } +} + // Emphasized .antiEmphasized { padding: .75rem; @@ -435,7 +446,7 @@ transition-timing-function: var(--timing-main); &:hover, - &:focus-within { + &.focusable:focus-within { // background-color: var(--body-color); border-color: var(--theme-list-divider-color); } diff --git a/packages/theme/styles/dialogs.scss b/packages/theme/styles/dialogs.scss index d55e7436d17..3fcebef26ca 100644 --- a/packages/theme/styles/dialogs.scss +++ b/packages/theme/styles/dialogs.scss @@ -39,8 +39,9 @@ justify-content: space-between; align-items: center; flex-shrink: 0; - padding: 1.5rem 1.5rem .5rem 1.75rem; - font-size: .8125rem; + + &.withSub { padding: 1.5rem 1.5rem 0; } + &:not(.withSub) { padding: 1.5rem 1.5rem 1rem; } &__title-wrap { display: flex; @@ -58,7 +59,7 @@ line-height: 150%; color: var(--theme-caption-color); } - &__divider { color: var(--theme-content-color); } + &__divider { color: var(--theme-dark-color); } &__error { min-width: 0; flex-grow: 1; @@ -74,17 +75,24 @@ } } + .antiCard-subheader { + display: flex; + align-items: center; + flex-shrink: 0; + padding: .5rem 1.5rem 1rem; + min-width: 0; + min-height: 0; + } + .antiCard-content { display: flex; flex-direction: column; flex-grow: 1; flex-shrink: 1; - padding: 1rem 1.75rem; + // margin: 1.5rem 1.5rem .5rem; height: fit-content; min-width: 0; min-height: 0; - - & > *:not(:last-child) { margin-bottom: 1rem; } } .antiCard-pool { @@ -92,18 +100,41 @@ display: flex; align-items: center; flex-wrap: wrap; - margin: .5rem 1.25rem 0 1.75rem; + margin: .5rem 1.5rem 1.5rem; min-width: 0; font-size: .8125rem; color: var(--theme-caption-color); + &::after { + content: ''; + width: 100%; + order: 0; + } &__separator { flex-shrink: 0; - margin-top: 1.25rem; + margin-top: 1.5rem; height: 1px; background-color: var(--theme-popup-divider); } & > * { margin: .5rem .5rem 0 0; } + .new-line { + min-width: 0; + order: 1; + } + } + + .antiCard-attachments { + background-color: var(--theme-bg-accent-color); + border-top: 1px solid var(--theme-popup-divider); + + &__container { + display: flex; + align-items: center; + margin: 1rem 1.5rem; + + & > * { margin-right: 1rem; } + & > *:last-child { margin-right: 1.5rem; } + } } .antiCard-footer { @@ -113,10 +144,11 @@ display: flex; justify-content: space-between; align-items: center; - padding: 1rem 1.75rem; + padding: 1rem 1.5rem; height: 4.25rem; border-radius: 0 0 .5rem .5rem; - + + &.divide { border-top: 1px solid var(--theme-popup-divider); } &.reverse { flex-direction: row-reverse; } &__error { flex-grow: 1; diff --git a/packages/ui/src/components/Button.svelte b/packages/ui/src/components/Button.svelte index f1973ecdb6f..334cd731133 100644 --- a/packages/ui/src/components/Button.svelte +++ b/packages/ui/src/components/Button.svelte @@ -53,9 +53,11 @@ export let accent: boolean = false // $: iconSize = size === 'inline' ? 'inline' : 'small' + let iconOnly: boolean = false $: iconOnly = label === undefined && - ($$slots.content === undefined || $$slots.icon !== undefined || $$slots.iconRight !== undefined) + $$slots.content === undefined && + (icon !== undefined || iconRight !== undefined || $$slots.icon || $$slots.iconRight) onMount(() => { if (focus && input) { @@ -102,6 +104,8 @@ class:highlight class:selected class:notSelected + class:iconL={(icon || $$slots.icon) && (label || $$slots.content)} + class:iconR={(iconRight || $$slots.iconRight) && (label || $$slots.content)} disabled={disabled || loading} class:short style:width @@ -149,13 +153,20 @@ width: 1.375rem; } } - .small { + .x-small { height: 1.5rem; font-size: 0.75rem; &.only-icon { width: 1.5rem; } } + .small { + height: 1.75rem; + font-size: 0.8125rem; + &.only-icon { + width: 1.75rem; + } + } .medium { height: 2rem; &.only-icon { diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index cfe4407d3bc..65c22e7a24c 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -34,6 +34,7 @@ export let maxDigitsAfterPoint: number | undefined = undefined export let kind: EditStyle = 'editbox' export let focus: boolean = false + export let select: boolean = false export let focusable: boolean = false export let disabled: boolean = false export let fullSize = false @@ -89,6 +90,10 @@ input.focus() focus = false } + if (select) { + input.select() + select = false + } computeSize(input) }) @@ -99,6 +104,9 @@ export function focusInput () { input?.focus() } + export function selectInput () { + input?.select() + } // Focusable control with index export let focusIndex = -1 @@ -218,12 +226,11 @@ input { padding: 0.25rem 0.5rem; - background-color: var(--accent-bg-color); - border: 1px solid transparent; + background-color: var(--theme-editbox-focus-color); border-radius: 0.25rem; &:focus { - border: 1px solid var(--primary-edit-border-color); + box-shadow: 0 0 0 1px var(--theme-editbox-focus-border); } } } @@ -231,12 +238,11 @@ margin: 0 -0.75rem; padding: 0.625rem 0.75rem; width: calc(100% + 1.5rem); - border: 1px solid transparent; border-radius: 0.25rem; transition: border-color 0.15s ease-in-out; &:focus-within { - border-color: var(--primary-edit-border-color); + box-shadow: 0 0 0 1px var(--theme-editbox-focus-border); } } @@ -244,7 +250,7 @@ margin: 0; padding: 0; min-width: 0; - color: var(--caption-color); + color: var(--theme-caption-color); border: none; border-radius: 2px; diff --git a/packages/ui/src/components/Icon.svelte b/packages/ui/src/components/Icon.svelte index e384844cd8c..c5ae7f82c94 100644 --- a/packages/ui/src/components/Icon.svelte +++ b/packages/ui/src/components/Icon.svelte @@ -37,7 +37,7 @@ {#if isAsset(icon)} - + {:else if typeof icon !== 'string'} diff --git a/packages/ui/src/components/Scroller.svelte b/packages/ui/src/components/Scroller.svelte index eb1db2cf88a..0d2b3b654db 100644 --- a/packages/ui/src/components/Scroller.svelte +++ b/packages/ui/src/components/Scroller.svelte @@ -475,7 +475,7 @@ divHeight = element.clientHeight }} class="scroll relative flex-shrink" - class:overflow-x={horizontal ? 'auto' : 'hidden'} + style:overflow-x={horizontal ? 'auto' : 'hidden'} on:scroll={(evt) => { if ($tooltipstore.label !== undefined) closeTooltip() const newPos = divScroll?.scrollTop ?? 0 diff --git a/packages/ui/src/components/calendar/DatePicker.svelte b/packages/ui/src/components/calendar/DatePicker.svelte index 5eb6074ee3f..24feafb2b77 100644 --- a/packages/ui/src/components/calendar/DatePicker.svelte +++ b/packages/ui/src/components/calendar/DatePicker.svelte @@ -23,7 +23,7 @@ export let title: IntlString export let value: number | null | undefined = null export let withTime: boolean = false - export let icon: 'normal' | 'warning' | 'overdue' = 'normal' + export let iconModifier: 'normal' | 'warning' | 'overdue' = 'normal' export let labelNull: IntlString = ui.string.NoDate const dispatch = createEventDispatcher() @@ -41,6 +41,6 @@
- +
diff --git a/packages/ui/src/components/calendar/DatePresenter.svelte b/packages/ui/src/components/calendar/DatePresenter.svelte index 50f45eae585..ad911110249 100644 --- a/packages/ui/src/components/calendar/DatePresenter.svelte +++ b/packages/ui/src/components/calendar/DatePresenter.svelte @@ -13,24 +13,26 @@ // limitations under the License. --> - + diff --git a/packages/ui/src/components/calendar/DueDatePresenter.svelte b/packages/ui/src/components/calendar/DueDatePresenter.svelte index 3eb6bef524d..8695678707c 100644 --- a/packages/ui/src/components/calendar/DueDatePresenter.svelte +++ b/packages/ui/src/components/calendar/DueDatePresenter.svelte @@ -93,6 +93,6 @@ } : undefined} > - +
{/if} diff --git a/packages/ui/src/components/icons/Attachment.svelte b/packages/ui/src/components/icons/Attachment.svelte index 674db6f10cd..b05e43e9813 100644 --- a/packages/ui/src/components/icons/Attachment.svelte +++ b/packages/ui/src/components/icons/Attachment.svelte @@ -15,11 +15,13 @@ --> - + diff --git a/packages/ui/src/components/icons/Close.svelte b/packages/ui/src/components/icons/Close.svelte index 7b67e9c1b69..3d1b11bb98a 100644 --- a/packages/ui/src/components/icons/Close.svelte +++ b/packages/ui/src/components/icons/Close.svelte @@ -3,8 +3,8 @@ export let fill: string = 'currentColor' - + diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index 3e803941298..e4ea721f725 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -125,7 +125,7 @@ export type ButtonKind = | 'dangerous' | 'list' | 'list-header' -export type ButtonSize = 'inline' | 'small' | 'medium' | 'large' | 'x-large' +export type ButtonSize = 'inline' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' export type ButtonShape = 'rectangle' | 'rectangle-left' | 'rectangle-right' | 'circle' | 'round' | 'filter' | undefined export type EditStyle = 'editbox' | 'large-style' | 'small-style' | 'search-style' | 'underline' export interface PopupPositionElement { diff --git a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte index 4efed0f7e1b..c8a62640782 100644 --- a/plugins/attachment-resources/src/components/AttachmentPresenter.svelte +++ b/plugins/attachment-resources/src/components/AttachmentPresenter.svelte @@ -81,6 +81,7 @@ >
@@ -106,7 +107,7 @@ on:click={(ev) => { ev.stopPropagation() ev.preventDefault() - dispatch('remove') + dispatch('remove', value) }} >