web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit 19f4309617f7bb90cfbd57a50a57a37198c3da3b
parent 18d1b82f879400a04983facf0dd1b5e263366f5f
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Sat, 31 Aug 2024 16:21:21 +0000

apps-lib: edit trellis title and row label types

Diffstat:
Mapps-lib/src/lib/components/trellis_row_label.svelte | 8++++----
Mapps-lib/src/lib/components/trellis_title.svelte | 12++++++------
Mapps-lib/src/lib/types/client.ts | 6+++---
Mapps-lib/src/lib/types/trellis.ts | 8+++-----
4 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/apps-lib/src/lib/components/trellis_row_label.svelte b/apps-lib/src/lib/components/trellis_row_label.svelte @@ -14,13 +14,13 @@ <div class={`flex flex-row h-full max-w-fit items-center ${title_l.hide_truncate ? `` : `truncate`}`} > - {#if title_l.icon} + {#if title_l.glyph} <div class={`flex flex-row justify-start items-center pr-1`} > <svelte:component this={glyph} - basis={{ ...title_l.icon }} + basis={{ ...title_l.glyph }} /> </div> {/if} @@ -41,10 +41,10 @@ <div class={`${fmt_cl(title_r.classes)} flex flex-row h-full max-w-fit gap-1 items-center ${title_r.hide_truncate ? `` : `truncate`}`} > - {#if title_r.icon} + {#if title_r.glyph} <svelte:component this={glyph} - basis={{ ...title_r.icon }} + basis={{ ...title_r.glyph }} /> {/if} <p diff --git a/apps-lib/src/lib/components/trellis_title.svelte b/apps-lib/src/lib/components/trellis_title.svelte @@ -35,21 +35,21 @@ await basis.link.callback(); }} > - {#if basis.link.glyph} + {#if basis.link.label} <p - class={`${fmt_cl(basis.link.glyph.classes)} font-sans text-trellisTitle uppercase fade-in`} + class={`${fmt_cl(basis.link.label.classes)} font-sans text-trellisTitle uppercase fade-in`} > - {basis.link.glyph.value || ``} + {basis.link.label.value || ``} </p> {/if} - {#if basis.link.icon} + {#if basis.link.glyph} <div class={`flex flex-row w-max`}> <svelte:component this={glyph} basis={{ - ...basis.link.icon, + ...basis.link.glyph, dim: `xs-`, - classes: `${fmt_cl(basis.link.icon.classes)} fade-in`, + classes: `${fmt_cl(basis.link.glyph.classes)} fade-in`, }} /> </div> diff --git a/apps-lib/src/lib/types/client.ts b/apps-lib/src/lib/types/client.ts @@ -69,12 +69,12 @@ export type ILy = { }; export type IGlOpt = { - icon?: IGlyph; + glyph?: IGlyph; } -export type IGlyphOpt = { +/*export type IGlyphOptFields = IGlyphFields & { glyph?: IGlyphFields; -}; +};*/ export type IGlyphFields = { value: string; diff --git a/apps-lib/src/lib/types/trellis.ts b/apps-lib/src/lib/types/trellis.ts @@ -1,4 +1,4 @@ -import type { ICbGOpt, ICbOpt, ICbROpt, IClOpt, IGlyphOpt, ILabel, ILabelTup, ILy } from "./client"; +import type { ICbGOpt, ICbOpt, ICbROpt, IClOpt, IGlOpt, ILabel, ILabelOpt, ILabelTup, ILy } from "./client"; import type { GlyphKey, IGlyph } from "./ui"; export type ITrellis = ILy & @@ -9,7 +9,7 @@ export type ITrellis = ILy & title?: ITrellisTitle; description?: ITrellisDescription; default_el?: ITrellisDefault; - list?: ITrellisKind[]; + list?: (ITrellisKind | undefined)[]; }; export type ITrellisTitle = ICbOpt & @@ -18,9 +18,7 @@ export type ITrellisTitle = ICbOpt & value: string | true; link?: ICbOpt & IClOpt & - IGlyphOpt & { - icon?: IGlyph; - }; + IGlOpt & ILabelOpt; }; export type ITrellisDescription = string | true;