|
@@ -2,126 +2,123 @@
|
|
|
<script>
|
|
<script>
|
|
|
import { Cell, CellGroup, Toast } from '../../../../../packages/stdf/components';
|
|
import { Cell, CellGroup, Toast } from '../../../../../packages/stdf/components';
|
|
|
|
|
|
|
|
- let visible = false;
|
|
|
|
|
|
|
+ let visible = $state(false);
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<div class="flex flex-col space-y-8 py-8">
|
|
<div class="flex flex-col space-y-8 py-8">
|
|
|
<div>
|
|
<div>
|
|
|
- <Cell title="Basic usage" />
|
|
|
|
|
- <Cell title="There are details on the right are details on the right" detail="Zero" />
|
|
|
|
|
- <Cell title="Use for details Slot" detail="slot">
|
|
|
|
|
- <span slot="detail" class="text-primary dark:text-dark text-xs">I am a slot content</span>
|
|
|
|
|
|
|
+ <Cell title="Basic Usage" />
|
|
|
|
|
+ <Cell title="With Detail" detail="Zeroing" />
|
|
|
|
|
+ <Cell title="Detail with Snippet">
|
|
|
|
|
+ {#snippet detailChild()}
|
|
|
|
|
+ <span class="text-primary dark:text-dark text-xs">I'm Snippet</span>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
- <Cell title="There is no arrow on the right" right="none" />
|
|
|
|
|
- <Cell title="Pure display, no click effect" right="none" clickAll={false} />
|
|
|
|
|
- <Cell title="Click event" detail="Please click me" on:click={() => (visible = true)} />
|
|
|
|
|
- <Toast bind:visible message="You poke to me!" />
|
|
|
|
|
- <Cell title="There are details on the right without arrows" detail="Zero" right="none" />
|
|
|
|
|
- <Cell title="The right switch (click the whole line to trigger the switch)" right={{ type: 'switch' }} />
|
|
|
|
|
- <Cell title="Switch with details" detail="explain" right={{ type: 'switch' }} />
|
|
|
|
|
- <Cell title="Switch with text" right={{ type: 'switch', switch: { inside: ['😭', '😄'] } }} />
|
|
|
|
|
- <Cell title="Switch full round corner" right={{ type: 'switch', switch: { radius: 'full' } }} />
|
|
|
|
|
- <Cell title="Just click on the switch to trigger" clickAll={false} right={{ type: 'switch' }} />
|
|
|
|
|
- <Cell title="Use on the left Icon" left={{ name: 'ri-bank-line', size: 20, theme: true, top: -2 }} />
|
|
|
|
|
- <Cell title="Use on the right side Icon" right={{ type: 'icon', name: 'ri-battery-charge-line', size: 20, theme: true }} />
|
|
|
|
|
- <Cell title="Left custom picture" left="slot">
|
|
|
|
|
- <div slot="left" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-6 h-6" src="/assets/images/icon_颁奖.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <Cell title="No Arrow" right={null} />
|
|
|
|
|
+ <Cell title="Display Only" right={null} clickAll={false} />
|
|
|
|
|
+ <Cell title="Click Event" detail="Click Me" onclick={() => (visible = true)} />
|
|
|
|
|
+ <Toast bind:visible message="You clicked me!" />
|
|
|
|
|
+ <Cell title="Detail without Arrow" detail="Zeroing" right={null} />
|
|
|
|
|
+ <Cell title="Switch (Click Row)" right={{ type: 'switch' }} />
|
|
|
|
|
+ <Cell title="Switch with Detail" detail="Description" right={{ type: 'switch' }} />
|
|
|
|
|
+ <Cell title="Switch with Text" right={{ type: 'switch', switch: { inside: ['😭', '😄'] } }} />
|
|
|
|
|
+ <Cell title="Rounded Switch" right={{ type: 'switch', switch: { radius: 'full' } }} />
|
|
|
|
|
+ <Cell title="Switch Only" clickAll={false} right={{ type: 'switch' }} />
|
|
|
|
|
+ <Cell title="Left Icon" left={{ name: 'ri-bank-line', size: 20, theme: true, top: -2 }} />
|
|
|
|
|
+ <Cell title="Right Icon" right={{ type: 'icon', icon: { name: 'ri-battery-charge-line', size: 20, theme: true } }} />
|
|
|
|
|
+ <Cell title="Left Image">
|
|
|
|
|
+ {#snippet leftChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-6 h-6" src="/assets/images/icon_颁奖.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
- <Cell title="Custom pictures are all left and right" left="slot" right="slot">
|
|
|
|
|
- <div slot="left" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-6 h-6" src="/assets/images/icon_评价.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div slot="right" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-6 h-6" src="/assets/images/icon_美食.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <Cell title="Both Side Images">
|
|
|
|
|
+ {#snippet leftChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-6 h-6" src="/assets/images/icon_评价.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
|
|
+ {#snippet rightChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-6 h-6" src="/assets/images/icon_美食.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
- <Cell title="Come to a big picture" left="slot">
|
|
|
|
|
- <div slot="left" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-10 h-10" src="/assets/images/icon_会员.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <Cell title="Larger Image">
|
|
|
|
|
+ {#snippet leftChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-10 h-10" src="/assets/images/icon_会员.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
- <Cell title="There is a secondary title on the left" subTitle="I am, but I am not second" />
|
|
|
|
|
- <Cell title="There are secondary title and right details" subTitle="I am, but I am not second" detail="Zero" />
|
|
|
|
|
- <Cell title="There is secondary information on the right" detail="Zero" info="Restart" />
|
|
|
|
|
|
|
+ <Cell title="With Subtitle" subTitle="I'm subtitle" />
|
|
|
|
|
+ <Cell title="Subtitle and Detail" subTitle="I'm subtitle" detail="Zeroing" />
|
|
|
|
|
+ <Cell title="Secondary Info" detail="Zeroing" info="Reboot" />
|
|
|
|
|
+ <Cell title="Both Secondary" subTitle="I'm subtitle" detail="Zeroing" info="Reboot" />
|
|
|
|
|
+ <Cell title="Both Secondary" subTitle="I'm subtitle" detail="With Arrow" info="Reboot" />
|
|
|
<Cell
|
|
<Cell
|
|
|
- title="There are secondary content on the left and right sides"
|
|
|
|
|
- subTitle="I am, but I am not second"
|
|
|
|
|
- detail="Zero"
|
|
|
|
|
- info="Restart"
|
|
|
|
|
- />
|
|
|
|
|
- <Cell
|
|
|
|
|
- title="There are secondary content on the left and right sides"
|
|
|
|
|
- subTitle="I am, but I am not second"
|
|
|
|
|
- detail="Come again"
|
|
|
|
|
- info="Restart"
|
|
|
|
|
- />
|
|
|
|
|
- <Cell
|
|
|
|
|
- title="There are secondary content on the right and right"
|
|
|
|
|
- subTitle="Come again on the left Icon"
|
|
|
|
|
- detail="Come again"
|
|
|
|
|
- info="Restart"
|
|
|
|
|
|
|
+ title="Both Secondary"
|
|
|
|
|
+ subTitle="With Left Icon"
|
|
|
|
|
+ detail="With Arrow"
|
|
|
|
|
+ info="Reboot"
|
|
|
left={{ name: 'ri-shopping-basket-line', theme: true }}
|
|
left={{ name: 'ri-shopping-basket-line', theme: true }}
|
|
|
/>
|
|
/>
|
|
|
- <Cell
|
|
|
|
|
- title="Come on the picture too"
|
|
|
|
|
- left="slot"
|
|
|
|
|
- subTitle="Left custom picture"
|
|
|
|
|
- detail="Right arrow"
|
|
|
|
|
- info="There is no segmentation line at the bottom"
|
|
|
|
|
- >
|
|
|
|
|
- <div slot="left" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-10 h-10" src="/assets/images/icon_火车票.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <Cell title="All Features" subTitle="Left Custom Image" detail="Right Arrow" info="No Border">
|
|
|
|
|
+ {#snippet leftChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-10 h-10" src="/assets/images/icon_火车票.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
<Cell
|
|
<Cell
|
|
|
- title="The title is long, long, long, long, long, long, long, long, long, long, long, long, long, long, and long, and automatically changed."
|
|
|
|
|
- subTitle="My secondary title is also very long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long, long."
|
|
|
|
|
|
|
+ title="Long title that wraps automatically when it exceeds the width of the container."
|
|
|
|
|
+ subTitle="Long subtitle that also wraps automatically when it exceeds the width."
|
|
|
/>
|
|
/>
|
|
|
<Cell
|
|
<Cell
|
|
|
- title="The big picture on the left is a big picture, the title is super long, and it is automatically changed. Try the rest of the match."
|
|
|
|
|
- subTitle="My secondary title is also very good...Oh not long."
|
|
|
|
|
- left="slot"
|
|
|
|
|
|
|
+ title="Large image with long title that wraps automatically. Try other combinations yourself."
|
|
|
|
|
+ subTitle="Short subtitle"
|
|
|
line={false}
|
|
line={false}
|
|
|
>
|
|
>
|
|
|
- <div slot="left" class="mr-1 shrink-0">
|
|
|
|
|
- <img class="w-20 h-20" src="/assets/images/icon_外卖.png" alt="" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ {#snippet leftChild()}
|
|
|
|
|
+ <div class="mr-1 shrink-0">
|
|
|
|
|
+ <img class="w-20 h-20" src="/assets/images/icon_外卖.png" alt="" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/snippet}
|
|
|
</Cell>
|
|
</Cell>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<CellGroup>
|
|
<CellGroup>
|
|
|
- <Cell title="Group" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
- <Cell title="Group" mx="0" my="0" shadow="none" radius="none" />
|
|
|
|
|
|
|
+ <Cell title="Group Usage" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
+ <Cell title="Group Usage" mx="0" my="0" shadow="none" radius="none" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup mx="0" radius="none">
|
|
<CellGroup mx="0" radius="none">
|
|
|
- <Cell title="Group" detail="No horizontal spacing" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
- <Cell title="Group" detail="Non rounded" mx="0" my="0" shadow="none" radius="none" />
|
|
|
|
|
|
|
+ <Cell title="Group Usage" detail="No Margin" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
+ <Cell title="Group Usage" detail="No Radius" mx="0" my="0" shadow="none" radius="none" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
<CellGroup shadow="xl" radius="2xl">
|
|
<CellGroup shadow="xl" radius="2xl">
|
|
|
- <Cell title="Group" detail="Increase projection" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
- <Cell title="Group" detail="Increase the corner" mx="0" my="0" shadow="none" radius="none" />
|
|
|
|
|
|
|
+ <Cell title="Group Usage" detail="Large Shadow" mx="0" my="0" shadow="none" line radius="none" />
|
|
|
|
|
+ <Cell title="Group Usage" detail="Large Radius" mx="0" my="0" shadow="none" radius="none" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
|
|
|
|
|
<div>
|
|
<div>
|
|
|
- <Cell title="Left -right distance" mx="0" radius="none" />
|
|
|
|
|
- <Cell title="Non -rounded" radius="none" />
|
|
|
|
|
- <Cell title="Basic rounded corner" radius="base" />
|
|
|
|
|
- <Cell title="Medium corner" radius="md" />
|
|
|
|
|
- <Cell title="Large rounded corner" radius="lg" />
|
|
|
|
|
- <Cell title="Increase the corner" radius="xl" />
|
|
|
|
|
- <Cell title="Larger corner" radius="2xl" />
|
|
|
|
|
- <Cell title="All -rounded corner" radius="full" />
|
|
|
|
|
- <Cell title="Increase projection" shadow="lg" />
|
|
|
|
|
|
|
+ <Cell title="No Margin" mx="0" radius="none" />
|
|
|
|
|
+ <Cell title="No Radius" radius="none" />
|
|
|
|
|
+ <Cell title="Base Radius" radius="base" />
|
|
|
|
|
+ <Cell title="Medium Radius" radius="md" />
|
|
|
|
|
+ <Cell title="Large Radius" radius="lg" />
|
|
|
|
|
+ <Cell title="XL Radius" radius="xl" />
|
|
|
|
|
+ <Cell title="2XL Radius" radius="2xl" />
|
|
|
|
|
+ <Cell title="Full Radius" radius="full" />
|
|
|
|
|
+ <Cell title="Large Shadow" shadow="lg" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <Cell title="Custom text color" injClass="text-primary dark:text-dark" />
|
|
|
|
|
- <Cell title="Custom background color" injClass="!bg-extend0/20 active:!bg-extend0/10" line={false} />
|
|
|
|
|
|
|
+ <Cell title="Custom Text Color" injClass="text-primary dark:text-dark" />
|
|
|
|
|
+ <Cell title="Custom Background" injClass="!bg-extend0/20 active:!bg-extend0/10" line={false} />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <Cell love title="Love version" />
|
|
|
|
|
- <Cell love title="Love version" detail="Love version" />
|
|
|
|
|
- <Cell love title="Love version" left={{ name: 'ri-hand-heart-line', theme: true }} />
|
|
|
|
|
|
|
+ <Cell love title="Care Version" />
|
|
|
|
|
+ <Cell love title="Care Version" detail="Care" />
|
|
|
|
|
+ <Cell love title="Care Version" left={{ name: 'ri-hand-heart-line', theme: true }} />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|