Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/docs/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
><div class="flex justify-center py-2">
<LightSwitch />
</div>
<AppRailTile label="General" title="Tile" value={'general'} on:click={onListItemClick}
<AppRailTile label="General" title="General" value={'general'} on:click={onListItemClick}
><i class="fa-solid fa-screwdriver-wrench text-2xl" /></AppRailTile
>
<AppRailTile label="Theme" title="Tile" value={'theme'} on:click={onListItemClick}
<AppRailTile label="Theme" title="Theme" value={'theme'} on:click={onListItemClick}
><i class="fa-solid fa-code-compare text-2xl" /></AppRailTile
>
<AppRailTile label="Components" title="Tile" value={'components'} on:click={onListItemClick}
<AppRailTile label="Components" title="Components" value={'components'} on:click={onListItemClick}
><i class="fa-solid fa-list-check text-2xl" /></AppRailTile
>
</svelte:fragment>
Expand All @@ -85,8 +85,8 @@
<nav class="list-nav">
<ul>
{#each list as { href, label, badge }}
<li on:click={onListItemClick} on:keypress>
<a {href} class={classesActive(href)} data-sveltekit-preload-data="hover">
<li>
<a {href} class={classesActive(href)} data-sveltekit-preload-data="hover" on:click={onListItemClick} on:keypress>
<span class="flex-auto">{@html label}</span>
{#if badge}<span class="badge variant-filled-secondary">{badge}</span>{/if}
</a>
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/CodeEditor/CodeEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<div class="flex gap-2">
<button
class="btn variant-filled-warning"
title="Reset"
id="{id}-reset"
on:click|preventDefault={() => modalStore.trigger(modal)}
><Fa icon={faArrowRotateLeft} /></button
Expand All @@ -108,6 +109,7 @@
class="btn border"
class:bg-slate-700={dark}
class:bg-white={!dark}
title="Toggle dark mode"
id="{id}-toggle"
on:click|preventDefault={() => (dark = !dark)}
>
Expand All @@ -124,11 +126,13 @@
<div class="flex gap-2">
<button
class="btn variant-filled-warning"
title="Cancel"
id="{id}-cancel"
on:click|preventDefault={() => dispatch('cancel')}><Fa icon={faXmark} /></button
>
<button
class="btn variant-filled-primary"
title="Save"
id="{id}-save"
disabled={!isValid}
on:click|preventDefault={() => dispatch('save')}><Fa icon={faSave} /></button
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/File/FileUploader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
{/if}
</div>

<button id={submitBt} color="primary" style="display:none"><Fa icon={faSave} /></button>
<button title="Submit" id={submitBt} color="primary" style="display:none"><Fa icon={faSave} /></button>
{:else}
<!-- while data is not loaded show a loading information -->

Expand Down
3 changes: 3 additions & 0 deletions src/lib/components/Table/ColumnsMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<button
type="button"
title="Hide or show columns"
class="btn btn-sm variant-filled-primary rounded-full order-last"
aria-label="Open menu to hide/show columns"
use:popup={popupCombobox}>Columns</button
Expand All @@ -25,9 +26,11 @@
>
{#each columns as column}
<div class="flex gap-3 items-center">
<label for={column.id} class="cursor-pointer" title={column.label}></label>
<input
aria-label="Toggle column visibility for column {column.label}"
type="checkbox"
id = {column.id}
bind:checked={column.visible}
disabled={columns.filter((c) => c.visible).length === 1 && column.visible}
/>
Expand Down
9 changes: 9 additions & 0 deletions src/lib/components/Table/TableContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,13 @@
<input
class="input p-2 border border-primary-500"
type="text"
title="Search within all table rows"
bind:value={searchValue}
placeholder="Search rows..."
id="{tableId}-search"
/><button
type="reset"
title="Clear search"
id="{tableId}-searchReset"
class="absolute right-3 items-center"
aria-label="Clear search"
Expand All @@ -424,6 +426,7 @@
</div>
<button
type="submit"
title="Search"
id="{tableId}-searchSubmit"
class="btn variant-filled-primary"
on:click|preventDefault={() => {
Expand All @@ -449,6 +452,7 @@
{#if toggle}
<SlideToggle
name="slider-label"
label="Fit to screen"
active="bg-primary-500"
size="sm"
checked={fitToScreen}
Expand All @@ -462,6 +466,7 @@
{#if resizable !== 'none'}
<button
type="button"
title="Reset column and row sizing"
class="btn btn-sm variant-filled-primary rounded-full order-last"
on:click|preventDefault={() =>
resetResize($headerRows, $pageRows, tableId, columns, resizable)}
Expand All @@ -471,6 +476,7 @@
{#if exportable}
<button
type="button"
title="Export table data as CSV"
class="btn btn-sm variant-filled-primary rounded-full order-last"
on:click|preventDefault={() => exportAsCsv(tableId, $exportedData)}
>Export as CSV</button
Expand All @@ -487,6 +493,7 @@
{...$tableAttrs}
class="table table-auto table-compact bg-tertiary-500/30 dark:bg-tertiary-900/10 overflow-clip"
id="{tableId}-table"
title="Table"
>
<!-- If table height is provided, making the top row sticky -->
<thead class={height != null && $pageRows.length > 0 ? `sticky top-0` : ''}>
Expand All @@ -512,6 +519,8 @@
<div class="flex gap-1 whitespace-pre-wrap">
<!-- Adding sorting config and styling -->
<span
role="button"
tabindex="0"
class:underline={props.sort.order}
class:normal-case={cell.id !== cell.label}
class:cursor-pointer={!props.sort.disabled}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/Table/TableFilter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@
</select>
{#if dropdowns.length > 1}
<div
role="button"
tabindex="0"
class="btn variant-filled-warning btn-sm h-full"
aria-label="Remove filter"
on:click|preventDefault={() => removeFilter(dropdown.option)}
Expand Down Expand Up @@ -321,6 +323,8 @@
{#if remainingFilters.length}
<div
class="btn variant-filled-secondary btn-sm cursor-pointer"
role="button"
tabindex="0"
on:click|stopPropagation={() => {
addFilter(remainingFilters[0].value, undefined);
}}
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/Table/TableFilterServer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@
</select>
{#if dropdowns.length > 1}
<div
role="button"
tabindex="0"
class="btn variant-filled-warning btn-sm h-full"
on:click|preventDefault={() => removeFilter(dropdown.option)}
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
Expand Down Expand Up @@ -320,6 +322,8 @@
<div
class="btn variant-filled-secondary btn-sm cursor-pointer"
aria-label="Add filter"
role="button"
tabindex="0"
on:click|stopPropagation={() => {
addFilter(remainingFilters[0].value, undefined);
}}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/components/Table/TablePaginationServer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<div class="flex justify-center gap-1">
<button
class="btn btn-sm variant-filled-primary"
title="Go to first page"
on:click|preventDefault={() => goTo('first')}
disabled={goToFirstPageDisabled}
aria-label="Go to first page"
Expand All @@ -94,6 +95,7 @@
>
<button
class="btn btn-sm variant-filled-primary"
title="Go to previous page"
id="{id}-previous"
aria-label="Go to previous page"
on:click|preventDefault={() => goTo('previous')}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/form/CheckboxKvPList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

<InputContainer {id} label={title} {feedback} {required} {help}>
{#each source as item}
<label class="flex items-center space-x-2" for={key}>
<label class="flex items-center space-x-2" for={item.key}>
<input
class="checkbox"
type="checkbox"
bind:group={target}
checked={item.key}
value={item.key}
id={item.key}
/>
<p>{item.value}</p>
</label>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/form/CheckboxList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<InputContainer label={title} {feedback} {required}>
{#each source as item}
<label class="flex items-center space-x-2" for={key}>
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
<label class="flex items-center space-x-2" for={item}>
<input class="checkbox" type="checkbox" bind:group={target} value={item} id={item}/>
<p>{item}</p>
</label>
{/each}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/page/Alert.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<slot name="actions" />

{#if deleteBtn}
<button class="btn hover:text-primary-100" on:click={() => (show = false)}>
<button class="btn hover:text-primary-100" title="Close alert" on:click={() => (show = false)}>
<Fa icon={faXmark} />
</button>
{/if}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/page/BackToTop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
<svelte:window on:scroll={handleOnScroll} />

<div class="w-full items-center">
<button class="btn ring back-to-top" on:click={goTop} class:hidden>Back to top</button>
<button class="btn ring back-to-top" title="Back to top" on:click={goTop} class:hidden>Back to top</button>
</div>
1 change: 1 addition & 0 deletions src/lib/components/page/GoToTop.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{#if showGotoTop}
<button
id="gotToTop"
title="Go to top"
class="chip variant-filled-warning fixed bottom-5 right-20 shadow-md"
on:click={gotoTop}
><Fa icon={faAngleUp}/></button >
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/page/HelpPopUp.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
{#if active}
<button
id="helpButton"
title="Open help window"
class="chip variant-filled-warning fixed bottom-5 right-10 shadow-md"
use:popup={helpClick}><Fa icon={faQuestion} /></button
>
Expand Down
6 changes: 3 additions & 3 deletions src/routes/components/form/examples/RadioGroupExample.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="text-sm">best of</label>
<RadioGroup>
<RadioItem bind:group={value} name="justify" value={0}>(music)</RadioItem>
<RadioItem bind:group={value} name="justify" value={1}>(movies)</RadioItem>
<RadioItem bind:group={value} name="justify" value={2}>(series)</RadioItem>
<RadioItem bind:group={value} name="justify" title="music" label="music" value={0}>(music)</RadioItem>
<RadioItem bind:group={value} name="justify" title="movies" label="movies" value={1}>(movies)</RadioItem>
<RadioItem bind:group={value} name="justify" title="series" label="series" value={2}>(series)</RadioItem>
</RadioGroup>
<div class="pt-3"><b>Value:</b> {value}</div>
2 changes: 1 addition & 1 deletion src/routes/components/table/components/IsAdmin.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
export let row;
</script>

<input type="checkbox" name="isAdmin" id={row.id} checked={value} disabled />
<input type="checkbox" name="isAdmin" title={value} id={row.id} checked={value} disabled />
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<div class="flex gap-2 w-min">
{#each buttons as button}
<button
title="{button.type}"
class={`btn btn-sm btn-icon rounded-md ${button.color}`}
on:click|preventDefault={() => eventDispatchFn(button.type)}
>
Expand Down