diff --git a/packages/presentation/src/components/DocPopup.svelte b/packages/presentation/src/components/DocPopup.svelte index 63a1fe2ba3..b99e17d6fe 100644 --- a/packages/presentation/src/components/DocPopup.svelte +++ b/packages/presentation/src/components/DocPopup.svelte @@ -206,7 +206,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} on:change={() => dispatch('search', search)} on:input={() => dispatch('search', search)} diff --git a/packages/presentation/src/components/IndexedDocumentCompare.svelte b/packages/presentation/src/components/IndexedDocumentCompare.svelte index 89d0e12fd6..e999d35816 100644 --- a/packages/presentation/src/components/IndexedDocumentCompare.svelte +++ b/packages/presentation/src/components/IndexedDocumentCompare.svelte @@ -11,7 +11,7 @@ - +
diff --git a/packages/presentation/src/components/IndexedDocumentPreview.svelte b/packages/presentation/src/components/IndexedDocumentPreview.svelte index aed7e0c5ab..ec74fbcc40 100644 --- a/packages/presentation/src/components/IndexedDocumentPreview.svelte +++ b/packages/presentation/src/components/IndexedDocumentPreview.svelte @@ -25,7 +25,7 @@ {#if noPanel}
@@ -36,7 +36,7 @@
{:else} - +
{#if indexDoc} diff --git a/packages/presentation/src/components/ObjectSearchPopup.svelte b/packages/presentation/src/components/ObjectSearchPopup.svelte index e251bbd37e..b6d84e566f 100644 --- a/packages/presentation/src/components/ObjectSearchPopup.svelte +++ b/packages/presentation/src/components/ObjectSearchPopup.svelte @@ -178,7 +178,7 @@ {/each}
- + diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 9479b4c802..36720588a7 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -197,6 +197,12 @@ input.search { display: flex; align-items: stretch; } +.flex-row-baseline { + display: flex; + align-items: baseline; + flex-wrap: nowrap; + min-width: 0; +} .flex-row-center { display: flex; align-items: center; @@ -659,6 +665,7 @@ input.search { .max-w-40 { max-width: 10rem; } .max-w-60 { max-width: 15rem; } .max-w-80 { max-width: 20rem; } +.max-w-120 { max-width: 30rem; } .max-w-240 { max-width: 60rem; } .max-h-0 { max-height: 0; } .max-h-2 { max-height: .5rem; } diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index 66b1db77a7..33e6d5f3f1 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -355,6 +355,18 @@ &.noMargin { margin: 0; } } +.antiHSpacer { + flex-shrink: 0; + width: .25rem; + + &:not(.withMargins) { margin: 0 !important; } + + &.x1-5 { width: .375rem; } + &.x2 { width: .5rem; } + &.x3 { width: .75rem; } + &.x4 { width: 1rem; } +} + .antiSection { display: flex; flex-direction: column; diff --git a/packages/ui/src/components/ColorPopup.svelte b/packages/ui/src/components/ColorPopup.svelte index 4883265f33..04bb300c00 100644 --- a/packages/ui/src/components/ColorPopup.svelte +++ b/packages/ui/src/components/ColorPopup.svelte @@ -75,7 +75,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} {placeholder} {placeholderParam} diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte index 5981abeb37..f21361d4f0 100644 --- a/packages/ui/src/components/Component.svelte +++ b/packages/ui/src/components/Component.svelte @@ -28,6 +28,7 @@ export let shrink: boolean = false export let showLoading = true export let inline: boolean = false + export let disabled: boolean = false $: component = is != null ? getResource(is) : Promise.reject(new Error('is not defined')) @@ -40,11 +41,33 @@ {:then Ctor} {#if $$slots.default !== undefined} - + {:else} - + {/if} {:catch err} diff --git a/packages/ui/src/components/DropdownLabelsPopup.svelte b/packages/ui/src/components/DropdownLabelsPopup.svelte index be8b57e3d2..0796762970 100644 --- a/packages/ui/src/components/DropdownLabelsPopup.svelte +++ b/packages/ui/src/components/DropdownLabelsPopup.svelte @@ -98,7 +98,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} {placeholder} {placeholderParam} diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index c4c1ecc1b1..9b14126905 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -33,7 +33,7 @@ export let format: 'text' | 'password' | 'number' = 'text' export let maxDigitsAfterPoint: number | undefined = undefined export let kind: EditStyle = 'editbox' - export let focus: boolean = false + export let autoFocus: boolean = false export let select: boolean = false export let focusable: boolean = false export let disabled: boolean = false @@ -87,9 +87,9 @@ } onMount(() => { - if (focus) { + if (autoFocus) { input.focus() - focus = false + autoFocus = false } if (select) { input.select() @@ -125,7 +125,7 @@ input.addEventListener('focus', updateFocus, { once: true }) } - export function focused (): void { + export function focus (): void { input.focus() } diff --git a/packages/ui/src/components/EditWithIcon.svelte b/packages/ui/src/components/EditWithIcon.svelte index 9d29633514..ed8b61d582 100644 --- a/packages/ui/src/components/EditWithIcon.svelte +++ b/packages/ui/src/components/EditWithIcon.svelte @@ -27,21 +27,23 @@ export let value: string | undefined = undefined export let placeholder: IntlString = plugin.string.EditBoxPlaceholder export let placeholderParam: any | undefined = undefined - export let focus: boolean = false + export let autoFocus: boolean = false export let size: 'small' | 'medium' | 'large' = 'medium' const dispatch = createEventDispatcher() let textHTML: HTMLInputElement let phTraslate: string = '' + export function focus () { + textHTML.focus() + autoFocus = false + } + $: translate(placeholder, placeholderParam ?? {}).then((res) => { phTraslate = res }) $: if (textHTML !== undefined) { - if (focus) { - textHTML.focus() - focus = false - } + if (autoFocus) focus() } diff --git a/packages/ui/src/components/SelectPopup.svelte b/packages/ui/src/components/SelectPopup.svelte index 41eb1dbebc..ed7b83477d 100644 --- a/packages/ui/src/components/SelectPopup.svelte +++ b/packages/ui/src/components/SelectPopup.svelte @@ -130,7 +130,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} {placeholder} {placeholderParam} diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index 31dcb7df64..be12b16396 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -191,6 +191,8 @@ class:doublePadding={$tooltip.label} use:resizeObserver={(element) => { clWidth = element.clientWidth + if (kind === 'submenu') fitSubmenu() + else fitTooltip(tooltipHTML) }} bind:this={tooltipHTML} > diff --git a/plugins/activity-resources/src/components/TxViewTx.svelte b/plugins/activity-resources/src/components/TxViewTx.svelte index 070bf2ebc2..61cdcde672 100644 --- a/plugins/activity-resources/src/components/TxViewTx.svelte +++ b/plugins/activity-resources/src/components/TxViewTx.svelte @@ -27,18 +27,20 @@ {/if} {#if typeof viewlet?.component === 'string'} - + {:else} - + {/if} +
{/each} {#each filterTx([...tx.txes, tx], core.class.TxRemoveDoc) as ctx, i} {#if i === 0 && !presentersOnly} {/if} {#if typeof viewlet?.component === 'string'} - + {:else} - + {/if} +
{/each} diff --git a/plugins/automation-resources/src/components/actions/ContentActionCreate.svelte b/plugins/automation-resources/src/components/actions/ContentActionCreate.svelte index 869c4e9bdd..76886eae12 100644 --- a/plugins/automation-resources/src/components/actions/ContentActionCreate.svelte +++ b/plugins/automation-resources/src/components/actions/ContentActionCreate.svelte @@ -46,7 +46,7 @@ {#if typeClass === core.class.TypeString || typeClass === core.class.TypeMarkup} {:else if typeClass === core.class.TypeNumber} - + {:else if typeClass === core.class.TypeBoolean} {/if} diff --git a/plugins/bitrix-resources/src/components/FieldMappingSynchronizer.svelte b/plugins/bitrix-resources/src/components/FieldMappingSynchronizer.svelte index a41dd7ac64..96ac04833c 100644 --- a/plugins/bitrix-resources/src/components/FieldMappingSynchronizer.svelte +++ b/plugins/bitrix-resources/src/components/FieldMappingSynchronizer.svelte @@ -153,7 +153,7 @@ { if (val) { @@ -165,7 +165,7 @@ { if (val) { diff --git a/plugins/board-resources/src/components/CreateBoard.svelte b/plugins/board-resources/src/components/CreateBoard.svelte index ad49a62427..3c2c0b6e31 100644 --- a/plugins/board-resources/src/components/CreateBoard.svelte +++ b/plugins/board-resources/src/components/CreateBoard.svelte @@ -60,7 +60,7 @@ icon={IconFolder} bind:value={name} placeholder={board.string.Board} - focus + autoFocus /> diff --git a/plugins/board-resources/src/components/CreateCard.svelte b/plugins/board-resources/src/components/CreateCard.svelte index a6f985596f..c8fabe44a8 100644 --- a/plugins/board-resources/src/components/CreateCard.svelte +++ b/plugins/board-resources/src/components/CreateCard.svelte @@ -89,7 +89,7 @@ bind:value={title} icon={board.icon.Card} placeholder={board.string.CardPlaceholder} - focus + autoFocus /> diff --git a/plugins/board-resources/src/components/EditCard.svelte b/plugins/board-resources/src/components/EditCard.svelte index 97980b3957..91a8fae1cd 100644 --- a/plugins/board-resources/src/components/EditCard.svelte +++ b/plugins/board-resources/src/components/EditCard.svelte @@ -146,7 +146,12 @@ }} /> - change('title', object?.title)} /> + change('title', object?.title)} + />
updateCard(client, object, 'title', object?.title)} />
@@ -158,7 +158,7 @@
updateCard(client, object, 'title', object?.title)} />
diff --git a/plugins/board-resources/src/components/popups/AddChecklist.svelte b/plugins/board-resources/src/components/popups/AddChecklist.svelte index 192e59c895..2ed185571b 100644 --- a/plugins/board-resources/src/components/popups/AddChecklist.svelte +++ b/plugins/board-resources/src/components/popups/AddChecklist.svelte @@ -118,7 +118,7 @@
diff --git a/plugins/calendar-resources/src/components/CreateEvent.svelte b/plugins/calendar-resources/src/components/CreateEvent.svelte index 53e2ab8801..a8ee3572cd 100644 --- a/plugins/calendar-resources/src/components/CreateEvent.svelte +++ b/plugins/calendar-resources/src/components/CreateEvent.svelte @@ -97,7 +97,7 @@ }} on:changeContent > - + - + {#if withInput} -
+
{/if} diff --git a/plugins/chunter-resources/src/components/ConvertDmToPrivateChannel.svelte b/plugins/chunter-resources/src/components/ConvertDmToPrivateChannel.svelte index 32037d3597..e8f072530a 100644 --- a/plugins/chunter-resources/src/components/ConvertDmToPrivateChannel.svelte +++ b/plugins/chunter-resources/src/components/ConvertDmToPrivateChannel.svelte @@ -66,6 +66,6 @@ icon={IconFolder} bind:value={name} placeholder={chunter.string.ChannelNamePlaceholder} - focus + autoFocus /> diff --git a/plugins/chunter-resources/src/components/CreateChannel.svelte b/plugins/chunter-resources/src/components/CreateChannel.svelte index 4cd6ee8731..1ac8beb25f 100644 --- a/plugins/chunter-resources/src/components/CreateChannel.svelte +++ b/plugins/chunter-resources/src/components/CreateChannel.svelte @@ -62,7 +62,7 @@ icon={IconFolder} bind:value={name} placeholder={chunter.string.ChannelNamePlaceholder} - focus + autoFocus />
diff --git a/plugins/contact-resources/src/components/CreatePerson.svelte b/plugins/contact-resources/src/components/CreatePerson.svelte index 7bab3a9977..f4f913ec50 100644 --- a/plugins/contact-resources/src/components/CreatePerson.svelte +++ b/plugins/contact-resources/src/components/CreatePerson.svelte @@ -96,7 +96,7 @@ placeholder={contact.string.PersonFirstNamePlaceholder} bind:value={firstName} kind={'large-style'} - focus + autoFocus focusIndex={1} /> {#if employee} - + {:else}
- +
{/if} diff --git a/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte b/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte index 5e7e4308a9..db9c3f20a8 100644 --- a/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte +++ b/plugins/contact-resources/src/components/EmployeeAccountRefPresenter.svelte @@ -16,15 +16,18 @@ {#if account} - + {/if} diff --git a/plugins/contact-resources/src/components/EmployeeFilter.svelte b/plugins/contact-resources/src/components/EmployeeFilter.svelte index ae1af5b121..6fcc3e473f 100644 --- a/plugins/contact-resources/src/components/EmployeeFilter.svelte +++ b/plugins/contact-resources/src/components/EmployeeFilter.svelte @@ -133,7 +133,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} placeholder={presentation.string.Search} on:change={() => { diff --git a/plugins/contact-resources/src/components/MemberPresenter.svelte b/plugins/contact-resources/src/components/MemberPresenter.svelte index 775d7450c3..76ba035f64 100644 --- a/plugins/contact-resources/src/components/MemberPresenter.svelte +++ b/plugins/contact-resources/src/components/MemberPresenter.svelte @@ -20,12 +20,13 @@ import { ContactPresenter } from '..' export let value: Member + export let disabled: boolean = false export let inline: boolean = false const contactRef = getClient().findOne(contact.class.Contact, { _id: value.contact }) - + {#await contactRef then ct} {#if ct} diff --git a/plugins/document-resources/src/components/CreateDocument.svelte b/plugins/document-resources/src/components/CreateDocument.svelte index 46f31506e4..de368dba26 100644 --- a/plugins/document-resources/src/components/CreateDocument.svelte +++ b/plugins/document-resources/src/components/CreateDocument.svelte @@ -114,7 +114,7 @@ placeholder={document.string.DocumentNamePlaceholder} bind:value={object.name} kind={'large-style'} - focus + autoFocus focusIndex={1} />
diff --git a/plugins/hr-resources/src/components/CreateDepartment.svelte b/plugins/hr-resources/src/components/CreateDepartment.svelte index 9832260750..9d792ccace 100644 --- a/plugins/hr-resources/src/components/CreateDepartment.svelte +++ b/plugins/hr-resources/src/components/CreateDepartment.svelte @@ -70,7 +70,7 @@ bind:value={name} placeholder={hr.string.DepartmentPlaceholder} kind={'large-style'} - focus + autoFocus />
diff --git a/plugins/hr-resources/src/components/schedule/CreatePublicHoliday.svelte b/plugins/hr-resources/src/components/schedule/CreatePublicHoliday.svelte index d27e8bb6a7..11d1de92bf 100644 --- a/plugins/hr-resources/src/components/schedule/CreatePublicHoliday.svelte +++ b/plugins/hr-resources/src/components/schedule/CreatePublicHoliday.svelte @@ -70,7 +70,7 @@ on:changeContent >
- +
diff --git a/plugins/inventory-resources/src/components/CreateCategory.svelte b/plugins/inventory-resources/src/components/CreateCategory.svelte index d9679c5d7f..f27bae41a5 100644 --- a/plugins/inventory-resources/src/components/CreateCategory.svelte +++ b/plugins/inventory-resources/src/components/CreateCategory.svelte @@ -69,6 +69,6 @@
- +
diff --git a/plugins/inventory-resources/src/components/CreateProduct.svelte b/plugins/inventory-resources/src/components/CreateProduct.svelte index 6632242aa4..859a067ca7 100644 --- a/plugins/inventory-resources/src/components/CreateProduct.svelte +++ b/plugins/inventory-resources/src/components/CreateProduct.svelte @@ -80,7 +80,7 @@
- +
- + diff --git a/plugins/lead-resources/src/components/CreateCustomer.svelte b/plugins/lead-resources/src/components/CreateCustomer.svelte index e4019f2897..0c3c53056e 100644 --- a/plugins/lead-resources/src/components/CreateCustomer.svelte +++ b/plugins/lead-resources/src/components/CreateCustomer.svelte @@ -162,7 +162,7 @@ placeholder={contact.string.PersonFirstNamePlaceholder} bind:value={firstName} kind={'large-style'} - focus + autoFocus focusIndex={1} />
diff --git a/plugins/lead-resources/src/components/CreateFunnel.svelte b/plugins/lead-resources/src/components/CreateFunnel.svelte index f4a76ede17..8ce69d3ad6 100644 --- a/plugins/lead-resources/src/components/CreateFunnel.svelte +++ b/plugins/lead-resources/src/components/CreateFunnel.svelte @@ -68,7 +68,7 @@ icon={IconFolder} bind:value={name} placeholder={lead.string.FunnelName} - focus + autoFocus />
- +
diff --git a/plugins/lead-resources/src/components/EditFunnel.svelte b/plugins/lead-resources/src/components/EditFunnel.svelte index 3fd7a237cf..ce0ed75862 100644 --- a/plugins/lead-resources/src/components/EditFunnel.svelte +++ b/plugins/lead-resources/src/components/EditFunnel.svelte @@ -86,7 +86,7 @@ bind:value={object.name} placeholder={lead.string.FunnelPlaceholder} kind={'large-style'} - focus + autoFocus focusable on:blur={() => { if (rawName !== object.name) onChange('name', object.name) diff --git a/plugins/notification-resources/src/components/activity/TxCollaboratorsChange.svelte b/plugins/notification-resources/src/components/activity/TxCollaboratorsChange.svelte index bb750af904..7049d72190 100644 --- a/plugins/notification-resources/src/components/activity/TxCollaboratorsChange.svelte +++ b/plugins/notification-resources/src/components/activity/TxCollaboratorsChange.svelte @@ -59,21 +59,23 @@ {#if diff} -
-
+
- +
{ diff --git a/plugins/tracker-resources/src/components/milestones/NewMilestone.svelte b/plugins/tracker-resources/src/components/milestones/NewMilestone.svelte index ff151498dc..d38db587b6 100644 --- a/plugins/tracker-resources/src/components/milestones/NewMilestone.svelte +++ b/plugins/tracker-resources/src/components/milestones/NewMilestone.svelte @@ -70,7 +70,12 @@ bind:space /> - + { if (isNew) { identifier = name.toLocaleUpperCase().replaceAll(' ', '_').substring(0, 5) diff --git a/plugins/tracker-resources/src/components/scrums/NewScrum.svelte b/plugins/tracker-resources/src/components/scrums/NewScrum.svelte index b3970101b1..a5f8ddd837 100644 --- a/plugins/tracker-resources/src/components/scrums/NewScrum.svelte +++ b/plugins/tracker-resources/src/components/scrums/NewScrum.svelte @@ -71,7 +71,12 @@ - + - +
diff --git a/plugins/tracker-resources/src/components/templates/IssueTemplateChildEditor.svelte b/plugins/tracker-resources/src/components/templates/IssueTemplateChildEditor.svelte index de890fd209..a205aa7910 100644 --- a/plugins/tracker-resources/src/components/templates/IssueTemplateChildEditor.svelte +++ b/plugins/tracker-resources/src/components/templates/IssueTemplateChildEditor.svelte @@ -114,7 +114,7 @@ bind:focusInput={focusIssueTitle} kind={'large-style'} placeholder={tracker.string.SubIssueTitlePlaceholder} - focus + autoFocus />
{#key newIssue.description} diff --git a/plugins/view-resources/src/components/ActionsPopup.svelte b/plugins/view-resources/src/components/ActionsPopup.svelte index 44b851c336..0ff1fc9ccf 100644 --- a/plugins/view-resources/src/components/ActionsPopup.svelte +++ b/plugins/view-resources/src/components/ActionsPopup.svelte @@ -16,9 +16,18 @@ import { WithLookup, Doc } from '@hcengineering/core' import { getResource, translate } from '@hcengineering/platform' import { createQuery, getClient, ActionContext } from '@hcengineering/presentation' - import ui, { Button, closePopup, Component, Icon, IconArrowLeft, Label } from '@hcengineering/ui' + import ui, { + Button, + closePopup, + Component, + Icon, + IconArrowLeft, + Label, + EditWithIcon, + IconSearch, + deviceOptionsStore + } from '@hcengineering/ui' import { Action, ViewContext } from '@hcengineering/view' - import { onMount } from 'svelte' import { filterActions, getSelection } from '../actions' import view from '../plugin' import { focusStore, selectionStore } from '../selection' @@ -31,7 +40,7 @@ let search: string = '' let actions: WithLookup[] = [] - let input: HTMLInputElement | undefined + let input: EditWithIcon const query = createQuery() @@ -112,15 +121,6 @@ } $: filterSearchActions(supportedActions, search) - let phTraslate: string = '' - $: translate(view.string.ActionPlaceholder, {}).then((res) => { - phTraslate = res - }) - - onMount(() => { - if (input) input.focus() - }) - let selection = 0 let list: ListView /* eslint-disable no-undef */ @@ -202,34 +202,36 @@ on:keydown={onKeydown} use:resizeObserver={() => dispatch('changeContent')} > -
- {#if $selectionStore.length > 0} -
- {$selectionStore.length} items -
- {:else if $focusStore.focus !== undefined} -
- -
- {/if} - {#if activeAction && activeAction?.actionPopup !== undefined} -
-
- {/if} -
+ {#if $selectionStore.length > 0 || $focusStore.focus !== undefined || (activeAction && activeAction?.actionPopup !== undefined)} +
+ {#if $selectionStore.length > 0} +
+ {$selectionStore.length} items +
+ {:else if $focusStore.focus !== undefined} +
+ +
+ {/if} + {#if activeAction && activeAction?.actionPopup !== undefined} +
+
+ {/if} +
+ {/if} {#if activeAction && activeAction?.actionPopup !== undefined} {:else}
- +
@@ -312,7 +322,7 @@ min-width: 1.5rem; color: var(--theme-caption-color); background-color: var(--theme-button-enabled); - border: 1px solid var(--theme-divider-color); + border: 1px solid var(--theme-button-border); border-radius: 0.25rem; } .key-box + .key-box { @@ -326,9 +336,13 @@ border-radius: 0.25rem; } .category-box { - display: inline-block; + display: flex; + align-items: center; + padding: 0.5rem 1rem; + min-height: 2rem; + text-transform: uppercase; + font-weight: 500; + font-size: 0.625rem; color: var(--theme-caption-color); - background-color: var(--theme-comp-header-color); - padding: 0.5rem; } diff --git a/plugins/view-resources/src/components/NumberEditor.svelte b/plugins/view-resources/src/components/NumberEditor.svelte index 8514ac32be..b50387c627 100644 --- a/plugins/view-resources/src/components/NumberEditor.svelte +++ b/plugins/view-resources/src/components/NumberEditor.svelte @@ -22,7 +22,7 @@ // export let label: IntlString export let placeholder: IntlString export let value: number | undefined - export let focus: boolean = false + export let autoFocus: boolean = false // export let maxWidth: string = '10rem' export let onChange: (value: number | undefined) => void export let kind: 'no-border' | 'link' | 'button' = 'no-border' @@ -74,5 +74,5 @@ {/if} {:else} - + {/if} diff --git a/plugins/view-resources/src/components/StringEditor.svelte b/plugins/view-resources/src/components/StringEditor.svelte index 0b07cac9ea..289b307080 100644 --- a/plugins/view-resources/src/components/StringEditor.svelte +++ b/plugins/view-resources/src/components/StringEditor.svelte @@ -22,7 +22,7 @@ // export let label: IntlString export let placeholder: IntlString export let value: string - export let focus: boolean = false + export let autoFocus: boolean = false export let select: boolean = false export let onChange: (value: string) => void = () => {} export let kind: ButtonKind | undefined = undefined @@ -71,5 +71,5 @@ {/if} {:else} - + {/if} diff --git a/plugins/view-resources/src/components/filter/FilterSave.svelte b/plugins/view-resources/src/components/filter/FilterSave.svelte index 9f2134897d..2cbf1569fe 100644 --- a/plugins/view-resources/src/components/filter/FilterSave.svelte +++ b/plugins/view-resources/src/components/filter/FilterSave.svelte @@ -57,7 +57,7 @@ placeholder={view.string.FilteredViewName} bind:value={filterName} kind={'large-style'} - focus + autoFocus focusIndex={1} />
diff --git a/plugins/view-resources/src/components/filter/ObjectFilter.svelte b/plugins/view-resources/src/components/filter/ObjectFilter.svelte index 2ba9d2d1f2..21206e8169 100644 --- a/plugins/view-resources/src/components/filter/ObjectFilter.svelte +++ b/plugins/view-resources/src/components/filter/ObjectFilter.svelte @@ -173,7 +173,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} placeholder={presentation.string.Search} on:change={() => { diff --git a/plugins/view-resources/src/components/filter/StringFilter.svelte b/plugins/view-resources/src/components/filter/StringFilter.svelte index 3943b7f4f4..7c078c2b19 100644 --- a/plugins/view-resources/src/components/filter/StringFilter.svelte +++ b/plugins/view-resources/src/components/filter/StringFilter.svelte @@ -54,7 +54,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} placeholder={filter.key.label} on:change diff --git a/plugins/view-resources/src/components/filter/ValueFilter.svelte b/plugins/view-resources/src/components/filter/ValueFilter.svelte index 28e14d5a22..242baa98ca 100644 --- a/plugins/view-resources/src/components/filter/ValueFilter.svelte +++ b/plugins/view-resources/src/components/filter/ValueFilter.svelte @@ -148,7 +148,7 @@ icon={IconSearch} size={'large'} width={'100%'} - focus={!$deviceOptionsStore.isMobile} + autoFocus={!$deviceOptionsStore.isMobile} bind:value={search} placeholder={presentation.string.Search} on:change={() => { diff --git a/plugins/view-resources/src/components/list/ListHeader.svelte b/plugins/view-resources/src/components/list/ListHeader.svelte index 680c843261..81b31dc2da 100644 --- a/plugins/view-resources/src/components/list/ListHeader.svelte +++ b/plugins/view-resources/src/components/list/ListHeader.svelte @@ -61,8 +61,9 @@ let accentColor: ColorDefinition | undefined = undefined + $: showColors = (viewOptions as any).shouldShowColors !== false $: headerBGColor = - level === 0 && (viewOptions as any).shouldShowColors !== false + level === 0 && showColors ? accentColor?.background ?? defaultBackground($themeStore.dark) : defaultBackground($themeStore.dark) @@ -84,6 +85,7 @@ style:--header-bg-color={headerBGColor} class="flex-between categoryHeader row" class:flat + class:noDivide={showColors} class:collapsed class:subLevel={level !== 0} class:lastCat @@ -225,6 +227,8 @@ } &::after { border: 1px solid var(--theme-list-border-color); + } + &.noDivide::after { border-bottom-color: transparent; } &::before { diff --git a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte index 996916ac9e..07eb7fe181 100644 --- a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte +++ b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte @@ -79,7 +79,7 @@ icon={clazz.icon} bind:value={space.name} placeholder={clazz.label} - focus + autoFocus on:change={onNameChange} />