feat(list)!: integrate OrderedList, UnorderedList with v11

This commit is contained in:
Eric Liu 2024-04-21 13:12:45 -07:00
commit 5ee6f526df
10 changed files with 71 additions and 197 deletions

View file

@ -1,12 +1,3 @@
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<li
class:bx--list__item="{true}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
<li class:bx--list__item="{true}" {...$$restProps}>
<slot />
</li>

View file

@ -1,26 +1,22 @@
<script>
/** Set to `true` to use the nested variant */
export let nested = false;
// @ts-check
/** Set to `true` to use native list styles */
export let native = false;
/** Set to `true` to use Carbon's expressive typesetting */
/** Set to `true` to use the nested variant */
export let nested = false;
/** Set to `true` to use expressive type styles */
export let expressive = false;
</script>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ol
class:bx--list--ordered="{!native}"
class:bx--list--ordered--native="{native}"
class:bx--list--nested="{nested}"
class:bx--list--expressive="{expressive}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
<slot />
</ol>

View file

@ -1,22 +1,18 @@
<script>
// @ts-check
/** Set to `true` to use the nested variant */
export let nested = false;
/** Set to `true` to use Carbon's expressive typesetting */
/** Set to `true` to use expressive type styles */
export let expressive = false;
</script>
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<ul
class:bx--list--unordered="{true}"
class:bx--list--nested="{nested}"
class:bx--list--expressive="{expressive}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
<slot />
</ul>