CSS cleanup ui (#4061)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2023-11-24 18:37:56 +03:00 committed by GitHub
parent 133e750e9d
commit d83b1a92b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 84 additions and 57 deletions

View File

@ -35,6 +35,8 @@
}
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<label
class="checkbox {size}"
class:circle

View File

@ -38,6 +38,7 @@
</script>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
{id}
class="flex-center icon-button icon-{size}"

View File

@ -62,6 +62,7 @@
}
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="selectPopup"
on:keydown={onKeydown}

View File

@ -85,6 +85,7 @@
}
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="selectPopup"
on:keydown={onKeydown}

View File

@ -74,6 +74,7 @@
}
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="selectPopup" use:resizeObserver={() => dispatch('changeContent')} on:keydown={onKeydown}>
{#if withSearch}
<div class="header">

View File

@ -54,6 +54,7 @@
}
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="selectPopup" use:resizeObserver={() => dispatch('changeContent')} on:keydown={onKeydown}>
<div class="menu-space" />
<div class="scroll">

View File

@ -50,6 +50,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="flex-between editbox {size}"
style={width ? 'width: ' + width : ''}

View File

@ -145,6 +145,7 @@
<div class="flex-row-center popup-header">
{#each categories as category}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="element"
class:selected={currentCategory.id === category.id}
@ -177,6 +178,7 @@
{#each category.emojis as emoji}
{#if emoji !== undefined}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="element" on:click={() => dispatch('close', emoji)}>{emoji}</div>
{/if}
{/each}

View File

@ -30,6 +30,7 @@
<div class="flex-col">
<div class="expandable-header flex-between" class:expanded class:bordered>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="flex-row-center mr-4"
class:cursor-pointer={expandable}

View File

@ -27,6 +27,7 @@
<div class="like-container" class:voted>
{#if value > 0}<span>{value}</span>{/if}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="icon" on:click={vote}>
<Like size={'small'} />
</div>

View File

@ -26,6 +26,8 @@
fname.length > maxLenght ? fname.substr(0, (maxLenght - 1) / 2) + '...' + fname.substr(-(maxLenght - 1) / 2) : fname
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span class="container" class:disabled on:click>
{#if icon}
<span class="icon">

View File

@ -70,6 +70,7 @@
{#each Array(count) as _, row}
<slot name="category" item={row} />
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="list-item{addClass ? ` ${addClass}` : ''}"
class:selection={row === selection}

View File

@ -113,6 +113,7 @@
$: popup?.focus()
</script>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="antiPopup{addClass ? ` ${addClass}` : ''}"
use:resizeObserver={() => {

View File

@ -27,6 +27,8 @@
<span class="toggle-switch" />
</label>
{#if label}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<span
class="mini-toggle-label"
on:click={() => {

View File

@ -121,6 +121,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="editbox-container"
on:click={() => {
@ -193,7 +194,7 @@
}
input[type='number'] {
-moz-appearance: textfield;
appearance: textfield;
}
}
</style>

View File

@ -169,6 +169,7 @@
/>
</div>
{#if props.element !== 'content'}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="modal-overlay"
class:show={options.showOverlay}

View File

@ -188,6 +188,7 @@
</div>
{#if overlay}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="modal-overlay"
class:testing

View File

@ -35,6 +35,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="container" on:click={click} class:cursor-pointer={editable}>
<div
class="bar"

View File

@ -32,6 +32,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="antiRadio gap-{gap}"
class:disabled

View File

@ -543,6 +543,7 @@
}
}}
>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this={divBox}
class="box{gap ? ` ${gap}` : ''}"
@ -614,6 +615,7 @@
{/if}
{#if mask !== 'none'}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="track"
class:hovered={isScrolling === 'vertical'}
@ -621,6 +623,7 @@
clickOnTrack(ev)
}}
/>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="bar"
class:hovered={isScrolling === 'vertical'}
@ -633,6 +636,7 @@
{/if}
{#if horizontal && maskH !== 'none'}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="track-horizontal"
class:hovered={isScrolling === 'horizontal'}
@ -640,6 +644,7 @@
clickOnTrack(ev, true)
}}
/>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="bar-horizontal"
class:hovered={isScrolling === 'horizontal'}

View File

@ -128,6 +128,7 @@
<div bind:this={scroller} class="antiStatesBar mask-{mask} {stepStyle}">
<slot />
</div>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="bar"
class:hovered={isScrolling}

View File

@ -26,6 +26,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="flex-row-center section-container"
on:click|preventDefault={() => {

View File

@ -95,6 +95,7 @@
<FocusHandler {manager} />
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="selectPopup"
bind:this={popupElement}

View File

@ -498,6 +498,7 @@
</script>
{#if sState !== SeparatorState.HIDDEN}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this={separator}
style:--separator-size={`${separatorSize}px`}

View File

@ -49,6 +49,7 @@
{#if !ignore && bigger && !fixed}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="showMore" class:outter={cHeight > limit} on:click={toggle}>
<Label label={cHeight > limit ? ui.string.ShowLess : ui.string.ShowMore} />
</div>

View File

@ -88,6 +88,7 @@
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<Panel bind:panelWidth bind:innerWidth bind:useMaxWidth {floatAside} {allowClose} isAside isHeader on:close>
<svelte:fragment slot="title">
{@const additionalStepInfo = currentStepModel?.additionalInfo}

View File

@ -39,6 +39,7 @@
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this={element}
on:keydown

View File

@ -70,6 +70,7 @@
<div class="tablist-container {kind} {size}">
{#each items as item, i}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
bind:this={tabs[i]}
class={kind === 'normal' || kind === 'regular' ? 'button' : 'plain'}

View File

@ -26,6 +26,7 @@
<div class="flex-stretch tabs-container" class:small={size === 'small'} style:padding class:noMargin>
{#each model as tab, i}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="flex-row-center tab"
class:selected={i === selected}

View File

@ -69,6 +69,7 @@
<div class="flex-row-center mt-3">
<Button label={submitLabel} kind="no-border" size="medium" on:click={submit} />
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="ml-2" on:click={cancel}>
<ActionIcon icon={IconClose} size="medium" action={cancel} />
</div>

View File

@ -51,6 +51,8 @@
})
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="antiSelect"
bind:this={container}

View File

@ -49,6 +49,8 @@
/>
</div>
<div class="bottom-divider mb-2" />
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
{#each values as value}
<div
class="ap-menuItem"

View File

@ -332,6 +332,7 @@
<Scroller bind:this={scroller}>
{#each lines as line, row}
{@const rangeRow = time.rows ? time.rows[row] : null}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="listGrid"
class:mListGridChecked={selectedRows.find((x) => x === row) !== undefined}
@ -423,6 +424,7 @@
</div>
</div>
{/if}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="timeline-splitter" class:moving style:left={`${panelWidth}px`} on:mousedown={splitterStart} />
</div>
@ -664,13 +666,6 @@
.component-presenter {
display: flex;
align-items: center;
.space {
flex-shrink: 0;
width: 0.25rem;
min-width: 0.25rem;
max-width: 0.25rem;
}
}
}
.timeline-action__button {
@ -748,11 +743,6 @@
}
}
.filler {
display: flex;
flex-grow: 1;
}
.gridElement {
display: flex;
align-items: center;
@ -763,16 +753,4 @@
margin-left: 0;
}
}
.iconPresenter {
padding-left: 0.45rem;
}
.componentPresenter {
display: flex;
align-items: center;
flex-shrink: 0;
width: 5.5rem;
margin-left: 0.5rem;
}
</style>

View File

@ -255,6 +255,7 @@
</script>
{#if $tooltip.kind === 'popup'}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="modal-overlay antiOverlay"
on:click|stopPropagation|preventDefault={() => {

View File

@ -204,6 +204,7 @@
<div class="datetime-input {kind}">
<div class="flex-row-center">
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[0].el}
class="digit"
@ -222,6 +223,7 @@
</span>
<span class="separator">.</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[1].el}
class="digit"
@ -240,6 +242,7 @@
</span>
<span class="separator">.</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[2].el}
class="digit"
@ -259,6 +262,7 @@
{#if withTime}
<div class="time-divider" />
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[3].el}
class="digit"
@ -277,6 +281,7 @@
</span>
<span class="separator">:</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[4].el}
class="digit"
@ -298,6 +303,7 @@
{#if currentDate}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="close-btn"
tabindex={0}

View File

@ -22,7 +22,6 @@
export let title: IntlString
export let value: number | null | undefined = null
export let withTime: boolean = false
export let iconModifier: 'normal' | 'warning' | 'overdue' = 'normal'
export let labelNull: IntlString = ui.string.NoDate

View File

@ -297,7 +297,6 @@
adaptValue()
</script>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<button
bind:this={datePresenter}
class="datetime-button {kind} {size}"
@ -311,6 +310,8 @@
>
{#if edit}
{#if withDate}
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[0].el}
class="digit"
@ -330,6 +331,8 @@
{:else}<Label label={ui.string.DD} />{/if}
</span>
<span class="separator">.</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[1].el}
class="digit"
@ -349,6 +352,8 @@
{:else}<Label label={ui.string.MM} />{/if}
</span>
<span class="separator">.</span>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<span
bind:this={edits[2].el}
class="digit"
@ -372,6 +377,8 @@
{#if mode === DateRangeMode.DATETIME}
<div class="time-divider" />
{/if}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<span
bind:this={edits[3].el}
class="digit"
@ -391,6 +398,8 @@
{:else}<Label label={ui.string.HH} />{/if}
</span>
<span class="separator">:</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[4].el}
class="digit"
@ -412,6 +421,8 @@
{/if}
{#if value}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<div
bind:this={closeBtn}
class="close-btn"

View File

@ -72,6 +72,8 @@
{#if viewDate}
<div class="monthYear">{monthYear}</div>
<div class="group" class:hideNavigator>
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="btn"
on:click={() => {
@ -81,6 +83,8 @@
>
<div class="icon-btn"><Icon icon={IconNavPrev} size={'full'} /></div>
</div>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="btn"
on:click={() => {
@ -101,6 +105,8 @@
>{capitalizeFirstLetter(getWeekDayName(day(firstDayOfCurrentMonth, dayOfWeek), 'short'))}</span
>
{/each}
<!-- svelte-ignore a11y-no-static-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
{#each days as day, i}
<div
class="day {day.style}"

View File

@ -57,6 +57,7 @@
{#each [...Array(7).keys()] as dayOfWeek}
{@const date = weekday(firstDayOfCurrentMonth, weekIndex, dayOfWeek)}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="cell"
class:weekend={isWeekend(date)}

View File

@ -131,6 +131,7 @@
class:wrongMonth={wrongM}
>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="day"
class:weekend={isWeekend(date)}

View File

@ -53,6 +53,7 @@
{#if typeof value === 'number'}
{@const numValue = value}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="btn"
on:click={() => {

View File

@ -170,6 +170,7 @@
<div class="datetime-input {size}" class:noBorder class:disabled>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[0].el}
class="digit"
@ -188,6 +189,7 @@
</span>
<span class="separator">:</span>
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
bind:this={edits[1].el}
class="digit"
@ -243,25 +245,6 @@
color: var(--theme-caption-color);
}
.close-btn {
display: flex;
justify-content: center;
align-items: center;
margin: 0 0.25rem;
width: 0.75rem;
height: 0.75rem;
color: var(--theme-content-color);
background-color: var(--theme-button-default);
outline: none;
border-radius: 50%;
cursor: pointer;
&:hover {
color: var(--theme-caption-color);
background-color: var(--theme-button-hovered);
}
}
.digit {
position: relative;
padding: 0 0.125rem;
@ -285,14 +268,6 @@
color: var(--primary-button-color);
background-color: var(--primary-button-default);
}
.time-divider {
flex-shrink: 0;
margin: 0 0.25rem;
width: 1px;
min-width: 1px;
height: 0.75rem;
background-color: var(--theme-button-border);
}
.separator {
margin: 0 0.1rem;
}

View File

@ -44,6 +44,7 @@
{@const day = getDay(weekMonday, dayOfWeek)}
<th>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="cursor-pointer uppercase flex-col-center"
class:today={areDatesEqual(todayDate, day)}

View File

@ -86,6 +86,7 @@
<ClockFace bind:timeZone={selected} size={clockSize} />
{#if selected !== ''}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<span
class="label overflow-label"
style:max-width={clockSize}

View File

@ -33,6 +33,7 @@
<div class="antiPopup" style:flex-direction={'row'} style:padding={'12px'}>
{#each fontsizes as font}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="statusPopup-option"
class:selected={selected === font.id}

View File

@ -27,6 +27,7 @@
<div class="ap-space x2" />
{#each langs as lang}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="ap-menuItem hoverable flex-row-center leading-16px"
on:click={() => {

View File

@ -33,6 +33,7 @@
<div class="antiPopup" style:flex-direction={'row'} style:padding={'12px'}>
{#each themes as theme}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class="statusPopup-option"
class:selected={selected === theme.id}

View File

@ -1,5 +1,5 @@
<script lang="ts">
export let size: 'small' | 'medium' | 'large'
// export let size: 'small' | 'medium' | 'large'
export let fill: string = 'currentColor'
</script>

View File

@ -1,5 +1,5 @@
<script lang="ts">
export let size: 'small' | 'medium' | 'large'
// export let size: 'small' | 'medium' | 'large'
export let fill: string = 'currentColor'
</script>

View File

@ -1,5 +1,5 @@
<script lang="ts">
export let size: 'small' | 'medium' | 'large'
// export let size: 'small' | 'medium' | 'large'
export let fill: string = 'currentColor'
</script>

View File

@ -57,6 +57,7 @@
{#if lenght > 0}
<div class="flex-row">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div bind:this={divBar} class="bar" on:click|stopPropagation>
<svg
bind:this={svgBack}