wip my timbers

This commit is contained in:
Gerard Burns 2024-04-04 21:40:20 +01:00
parent c011ff1598
commit 906f06238e
1 changed files with 108 additions and 39 deletions

View File

@ -41,100 +41,106 @@
class={`tooltipContents ${supportLevelClass}`} class={`tooltipContents ${supportLevelClass}`}
> >
<div class="topLine"> <div class="line topLine">
<span class="bullet"></span>
<div class="chip columnName"> <div class="chip columnName">
<span>
{columnName} {columnName}
</span>
</div> </div>
<span class="space" />
<span class="text"> is a </span> <span class="text"> is a </span>
<span class="space" />
<a target=”_blank” href={docLink} class="chip link topLink"> <a target=”_blank” href={docLink} class="chip link topLink">
<Icon size="S" name={columnIcon} /> <Icon size="S" name={columnIcon} />
<span class="text">{columnType} column</span> <span class="text">{columnType} column</span>
</a> </a>
<span class="period">.</span> <span class="period">.</span>
</div> </div>
<div class="divider"></div>
<div class={`line ${supportLevelClass}`}> <div class={`line ${supportLevelClass}`}>
<span class="bullet"></span> <span class="bullet"></span>
<div class={`chip supportChip ${supportLevelClass}`}> <div class={`chip supportChip ${supportLevelClass}`}>
<Icon size="S" tooltip={supportLevelIconTooltip} name={supportLevelIcon} /> <Icon size="S" tooltip={supportLevelIconTooltip} name={supportLevelIcon} />
<span class="text">{supportLevelText}</span> <span class="text">{supportLevelText}</span>
</div> </div>
<span class="space" />
<span class="text">with</span> <span class="text">with</span>
<span class="space" />
<div class="chip link"> <div class="chip link">
<Icon size="S" name={"GraphPie"} /> <Icon size="S" name={"GraphPie"} />
<span class="text">Chart components</span> <span class="text">Chart components</span>
</div> </div>
<span class="period">.</span>
</div> </div>
{#if warnings.includes("string number warning")} {#if warnings.includes("string number warning")}
<div class={`line`}> <div class={`line`}>
<span class="bullet"></span> <span class="bullet"></span>
<div class="chip link"> <span class="text">Any</span>
<span class="space" />
<div class="chip info">
<Icon size="S" name={"123"} /> <Icon size="S" name={"123"} />
<span class="text"> <span class="text">
Non-numeric values Non-number values
</span> </span>
</div> </div>
<span class="space" />
<span class="text"> <span class="text">
will not be displayed will be ignored
</span> </span>
<span class="period">.</span>
</div> </div>
{/if} {/if}
{#if warnings.includes("optional warning")} {#if warnings.includes("optional warning")}
<div class={`line`}> <div class={`line`}>
<span class="bullet"></span> <span class="bullet"></span>
<span class="text">No</span> <span class="text">No required</span>
<span class="space" />
<div class="chip link"> <div class="chip link">
<Icon size="S" name={"DataUnavailable"} /> <Icon size="S" name={"DataUnavailable"} />
<span class="text"> <span class="text">
Required constraint Constraint
</span> </span>
</div> </div>
<span class="comma">,</span>
<span class="text"> <span class="text">
so rows may be missing values so values may be missing
</span> </span>
<span class="period">.</span>
</div> </div>
{/if} {/if}
<!--
{#if errors.length > 0}
{#each errors as datum}
<p>{datum}</p>
{/each}
{:else if warnings.length > 0}
{#each warnings as datum}
<p>{datum}</p>
{/each}
{:else}
<p>{supportLevelIconTooltip}</p>
{/if}
-->
</div> </div>
<style> <style>
.chip { .chip {
box-sizing: border-box;
display: inline-flex; display: inline-flex;
padding: 3px 6px; padding: 3px 6px;
border-radius: 5px; border-radius: 5px;
vertical-align: sub; vertical-align: sub;
margin-right: 5px; filter: brightness(100%);
filter: brightness(90%);
} }
.chip:hover { .chip:hover {
filter: brightness(110%); filter: brightness(120%);
transition: filter 300ms transition: filter 300ms
} }
.chip :global(svg) {
color: var(--grey-6);
}
.columnName { .columnName {
font-style: italic; vertical-align: baseline;
background-color: var(--grey-3); background-color: var(--grey-3);
display: block;
font-style: italic;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
box-sizing: border-box; box-sizing: border-box;
display: block; flex-grow: 0;
flex-shrink: 1;
min-width: 0; min-width: 0;
margin-right: 0;
} }
.bullet { .bullet {
@ -144,8 +150,27 @@
margin-right: 10px; margin-right: 10px;
} }
.topLink { .period {
flex-shrink: 0; color: var(--grey-5);
font-size: 20px;
display: inline block;
}
.comma {
color: var(--grey-5);
font-size: 20px;
display: inline block;
margin-right: 4px;
}
.semiColon {
color: var(--grey-5);
font-size: 16px;
display: inline block;
}
.space {
margin-right: 5px;
} }
.divider { .divider {
@ -157,7 +182,7 @@
max-width: 400px; max-width: 400px;
background-color: var(--background-alt); background-color: var(--background-alt);
display: block; display: block;
padding: 12px; padding: 20px 16px;
border-radius: 5px; border-radius: 5px;
box-sizing: border-box; box-sizing: border-box;
} }
@ -167,9 +192,26 @@
align-items: center; align-items: center;
} }
.topLine > .text{ .topLine .space {
margin-right: 7px;
flex-shrink: 0; flex-shrink: 0;
margin: 0 5px; }
.topLine .text {
flex-shrink: 0;
}
.topLine .period {
flex-shrink: 0;
}
.topLine .bullet {
flex-shrink: 0;
}
.topLink {
flex-shrink: 0;
margin-right: 2px;
} }
.line { .line {
@ -185,24 +227,39 @@
.line > .text { .line > .text {
display: inline; display: inline;
margin-right: 5px;
} }
.link { .link {
background-color: var(--bb-indigo); background-color: var(--grey-3);
border: 1px solid red;
box-sizing: border-box;
border-color: var(--blue);
color: white; color: white;
} }
.info {
background-color: var(--grey-3);
color: white;
}
.info :global(svg) {
margin-right: 3px;
}
.link:hover { .link:hover {
cursor: pointer; cursor: pointer;
} }
.link :global(svg) { .link :global(svg) {
margin-right: 3px; margin-right: 3px;
color: var(--blue);
} }
.supportChip { .supportChip {
color: black; background-color: var(--grey-3);
color: var(--ink);
border: 1px solid red;
box-sizing: border-box;
} }
.supportChip :global(svg) { .supportChip :global(svg) {
@ -210,14 +267,26 @@
} }
.supportChip.supportLevelUnsupported { .supportChip.supportLevelUnsupported {
background-color: var(--red); border-color: var(--red);
}
.supportChip.supportLevelUnsupported :global(svg) {
color: var(--red);
} }
.supportChip.supportLevelPartialSupport { .supportChip.supportLevelPartialSupport {
background-color: var(--yellow); border-color: var(--yellow);
}
.supportChip.supportLevelPartialSupport :global(svg) {
color: var(--yellow);
} }
.supportChip.supportLevelSupported { .supportChip.supportLevelSupported {
background-color: var(--green); border-color: var(--green);
}
.supportChip.supportLevelSupported :global(svg) {
color: var(--green);
} }
</style> </style>