@adia-ai/web-components 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/USAGE.md +286 -5
- package/bin/doc.mjs +379 -0
- package/components/accordion/accordion.examples.md +49 -0
- package/components/action-list/action-list.examples.md +33 -0
- package/components/agent-artifact/agent-artifact.examples.md +28 -0
- package/components/agent-feedback-bar/agent-feedback-bar.examples.md +24 -0
- package/components/agent-questions/agent-questions.examples.md +13 -0
- package/components/agent-reasoning/agent-reasoning.examples.md +28 -0
- package/components/agent-suggestions/agent-suggestions.examples.md +19 -0
- package/components/agent-trace/agent-trace.examples.md +19 -0
- package/components/alert/alert.examples.md +19 -0
- package/components/aside/aside.examples.md +38 -0
- package/components/avatar/avatar.examples.md +19 -0
- package/components/badge/badge.examples.md +19 -0
- package/components/block/block.examples.md +29 -0
- package/components/breadcrumb/breadcrumb.examples.md +32 -0
- package/components/button/button.examples.md +19 -0
- package/components/calendar-picker/calendar-picker.examples.md +23 -0
- package/components/canvas/canvas.examples.md +49 -0
- package/components/card/card.examples.md +25 -0
- package/components/chart/chart.examples.md +19 -0
- package/components/chart-legend/chart-legend.examples.md +22 -0
- package/components/chat-thread/chat-thread.examples.md +35 -0
- package/components/check/check.examples.md +19 -0
- package/components/code/code.examples.md +31 -0
- package/components/col/col.examples.md +11 -0
- package/components/color-input/color-input.examples.md +19 -0
- package/components/color-picker/color-picker.examples.md +19 -0
- package/components/command/command.examples.md +58 -0
- package/components/demo-toggle/demo-toggle.examples.md +19 -0
- package/components/description-list/description-list.examples.md +37 -0
- package/components/divider/divider.examples.md +31 -0
- package/components/drawer/drawer.examples.md +63 -0
- package/components/embed/embed.examples.md +19 -0
- package/components/empty-state/empty-state.examples.md +21 -0
- package/components/feed/feed.examples.md +19 -0
- package/components/field/field.examples.md +29 -0
- package/components/fields/fields.examples.md +58 -0
- package/components/footer/footer.examples.md +18 -0
- package/components/grid/grid.examples.md +21 -0
- package/components/header/header.examples.md +32 -0
- package/components/heatmap/heatmap.examples.md +19 -0
- package/components/icon/icon.examples.md +19 -0
- package/components/image/image.examples.md +19 -0
- package/components/input/input.examples.md +21 -0
- package/components/inspector/inspector.examples.md +27 -0
- package/components/kbd/kbd.examples.md +29 -0
- package/components/link/link.examples.md +25 -0
- package/components/list/list.examples.md +33 -0
- package/components/menu/menu.examples.md +37 -0
- package/components/modal/modal.examples.md +43 -0
- package/components/nav/nav.examples.md +39 -0
- package/components/nav-group/nav-group.examples.md +35 -0
- package/components/nav-item/nav-item.examples.md +25 -0
- package/components/noodles/noodles.examples.md +30 -0
- package/components/option-card/option-card.examples.md +47 -0
- package/components/otp-input/otp-input.examples.md +19 -0
- package/components/page/page.examples.md +46 -0
- package/components/pagination/pagination.examples.md +19 -0
- package/components/pane/pane.examples.md +40 -0
- package/components/pipeline-status/pipeline-status.examples.md +19 -0
- package/components/popover/popover.examples.md +34 -0
- package/components/progress/progress.examples.md +19 -0
- package/components/progress-row/progress-row.examples.md +19 -0
- package/components/radio/radio.examples.md +19 -0
- package/components/range/range.examples.md +19 -0
- package/components/rating/rating.examples.md +19 -0
- package/components/richtext/richtext.examples.md +19 -0
- package/components/row/row.examples.md +11 -0
- package/components/search/search.examples.md +19 -0
- package/components/section/section.examples.md +37 -0
- package/components/segment/segment.examples.md +32 -0
- package/components/segmented/segmented.examples.md +31 -0
- package/components/select/select.examples.md +49 -0
- package/components/skeleton/skeleton.examples.md +19 -0
- package/components/slider/slider.examples.md +21 -0
- package/components/stack/stack.examples.md +10 -0
- package/components/stat/stat.examples.md +19 -0
- package/components/step-progress/step-progress.examples.md +19 -0
- package/components/stepper/stepper.examples.md +37 -0
- package/components/stream/stream.examples.md +19 -0
- package/components/swatch/swatch.examples.md +23 -0
- package/components/swiper/swiper.examples.md +139 -0
- package/components/switch/switch.examples.md +19 -0
- package/components/table/table.examples.md +19 -0
- package/components/table-toolbar/table-toolbar.examples.md +12 -0
- package/components/tabs/tabs.examples.md +49 -0
- package/components/tag/tag.examples.md +19 -0
- package/components/text/text.examples.md +19 -0
- package/components/textarea/textarea.examples.md +23 -0
- package/components/timeline/timeline.examples.md +35 -0
- package/components/toast/toast.examples.md +19 -0
- package/components/toggle-group/toggle-group.examples.md +33 -0
- package/components/toggle-scheme/toggle-scheme.examples.md +19 -0
- package/components/toolbar/toolbar.examples.md +46 -0
- package/components/tooltip/tooltip.examples.md +25 -0
- package/components/tree/tree.examples.md +57 -0
- package/components/upload/upload.examples.md +19 -0
- package/core/template.js +236 -7
- package/core/template.test.js +294 -0
- package/custom-elements.json +9012 -0
- package/package.json +7 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# page — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<page-ui max-width="prose" padding="6">
|
|
7
|
+
<header-ui>
|
|
8
|
+
<text-ui variant="title">Welcome back</text-ui>
|
|
9
|
+
</header-ui>
|
|
10
|
+
<section-ui>
|
|
11
|
+
<text-ui>Sign in to continue.</text-ui>
|
|
12
|
+
</section-ui>
|
|
13
|
+
<footer-ui>
|
|
14
|
+
<button-ui text="Sign in" variant="solid" stretch></button-ui>
|
|
15
|
+
</footer-ui>
|
|
16
|
+
</page-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Sticky header
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<page-ui max-width="prose" padding="6" sticky-header>
|
|
23
|
+
<header-ui>
|
|
24
|
+
<text-ui variant="title">Long article</text-ui>
|
|
25
|
+
</header-ui>
|
|
26
|
+
<section-ui>
|
|
27
|
+
<!-- long content -->
|
|
28
|
+
</section-ui>
|
|
29
|
+
</page-ui>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Composition with <admin-shell>
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<admin-shell>
|
|
36
|
+
<header-ui slot="leading">…</header-ui>
|
|
37
|
+
<aside-ui slot="leading">…</aside-ui>
|
|
38
|
+
<section-ui>
|
|
39
|
+
<page-ui max-width="prose" padding="6">
|
|
40
|
+
<!-- omit [scroll] — the shell scrolls -->
|
|
41
|
+
<header-ui>…</header-ui>
|
|
42
|
+
<section-ui>…</section-ui>
|
|
43
|
+
</page-ui>
|
|
44
|
+
</section-ui>
|
|
45
|
+
</admin-shell>
|
|
46
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# pagination — Examples
|
|
2
|
+
|
|
3
|
+
## basic (5 pages)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<pagination-ui page="1" total="5"></pagination-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## variant
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<pagination-ui page="3" total="10"></pagination-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## size
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<pagination-ui size="sm" total="100" page="1"></pagination-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# pane — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<pane-ui>
|
|
7
|
+
<header>Details</header>
|
|
8
|
+
<section>
|
|
9
|
+
<div data-col>
|
|
10
|
+
<p>This is basic pane content. Click the header to collapse.</p>
|
|
11
|
+
</div>
|
|
12
|
+
</section>
|
|
13
|
+
</pane-ui>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## collapsed
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<pane-ui collapsed>
|
|
20
|
+
<header>Collapsed Pane</header>
|
|
21
|
+
<section>
|
|
22
|
+
<div data-col>
|
|
23
|
+
<p>This content is hidden until the pane is expanded.</p>
|
|
24
|
+
</div>
|
|
25
|
+
</section>
|
|
26
|
+
</pane-ui>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## resizable
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<pane-ui resizable min-width="200" max-width="500" style="width:300px;">
|
|
33
|
+
<header>Resizable</header>
|
|
34
|
+
<section>
|
|
35
|
+
<div data-col>
|
|
36
|
+
<p>Drag the right edge to resize this pane between 200px and 500px.</p>
|
|
37
|
+
</div>
|
|
38
|
+
</section>
|
|
39
|
+
</pane-ui>
|
|
40
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# pipeline-status — Examples
|
|
2
|
+
|
|
3
|
+
## stage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<pipeline-status-ui stage="Building catalog" message="Reading 100 patterns from disk..."></pipeline-status-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## message
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<pipeline-status-ui stage="Running evals" message="32 / 100 intents scored..."></pipeline-status-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## complete
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<pipeline-status-ui stage="Done" message="All 100 intents passed" status="completed"></pipeline-status-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# popover — Examples
|
|
2
|
+
|
|
3
|
+
## click trigger
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<popover-ui trigger="click">
|
|
7
|
+
<button-ui slot="trigger" text="Click me" variant="outline"></button-ui>
|
|
8
|
+
<div slot="content" style="padding:var(--a-space-3);">
|
|
9
|
+
<p>This popover opens on click and closes on click outside or Escape.</p>
|
|
10
|
+
</div>
|
|
11
|
+
</popover-ui>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## hover trigger
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<popover-ui trigger="hover">
|
|
18
|
+
<button-ui slot="trigger" text="Hover me" variant="outline"></button-ui>
|
|
19
|
+
<div slot="content" style="padding:var(--a-space-3);">
|
|
20
|
+
<p>This popover opens on hover and stays open while the pointer is over it.</p>
|
|
21
|
+
</div>
|
|
22
|
+
</popover-ui>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## placement
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<popover-ui placement="bottom">
|
|
29
|
+
<button-ui slot="trigger" text="Bottom" variant="outline" size="sm"></button-ui>
|
|
30
|
+
<div slot="content" style="padding:var(--a-space-3);">
|
|
31
|
+
<p>Placed below the trigger.</p>
|
|
32
|
+
</div>
|
|
33
|
+
</popover-ui>
|
|
34
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# progress — Examples
|
|
2
|
+
|
|
3
|
+
## value
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<progress-ui value="0" style="width:200px"></progress-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## indeterminate
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<progress-ui style="width:200px"></progress-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## variant
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<progress-ui value="60" variant="bar" style="width:200px"></progress-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# progress-row — Examples
|
|
2
|
+
|
|
3
|
+
## Basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<progress-row-ui label="Storage" value="42"></progress-row-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## With Meta
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<progress-row-ui label="Documents" value="65" meta="6.5 GB / 10 GB"></progress-row-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Variants
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<progress-row-ui label="Healthy" value="30" meta="30%" variant="success"></progress-row-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# radio — Examples
|
|
2
|
+
|
|
3
|
+
## checked
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<radio-ui label="Unchecked" name="demo-state"></radio-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## disabled
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<radio-ui label="Disabled Unchecked" name="demo-dis" disabled></radio-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## label
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<radio-ui label="With Label" name="demo-label"></radio-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# range — Examples
|
|
2
|
+
|
|
3
|
+
## default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<range-ui value="50"></range-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## label + value + suffix
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<range-ui label="Width" value="200" min="0" max="500" suffix="px"></range-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## min / max / step
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<range-ui label="Font Size" value="16" min="8" max="72" step="1" suffix="px"></range-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# rating — Examples
|
|
2
|
+
|
|
3
|
+
## Basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<rating-ui value="3" readonly></rating-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Interactive
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<rating-ui value="0" name="rating-basic"></rating-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## icon
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<rating-ui value="4" icon="heart" variant="warning" readonly></rating-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# richtext — Examples
|
|
2
|
+
|
|
3
|
+
## markdown
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<richtext-ui markdown="# Hello world Welcome to **AdiaUI**. This paragraph was parsed from markdown: - Lists - Render - Cleanly `inline code` and [links](https://example.com) work too."></richtext-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## src
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<richtext-ui src="/README.md"></richtext-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## code blocks
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<richtext-ui markdown="## Example ```js function greet(name) { return `Hello, ${name}!`; } ``` Inline `code` also works."></richtext-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# search — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<search-ui></search-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## placeholder
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<search-ui placeholder="Find components..."></search-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## debounce
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<search-ui debounce="100" placeholder="Fast (100ms)"></search-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# section — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<card-ui>
|
|
7
|
+
<header-ui>
|
|
8
|
+
<text-ui variant="title">Settings</text-ui>
|
|
9
|
+
</header-ui>
|
|
10
|
+
<section-ui>
|
|
11
|
+
<col-ui gap="md">
|
|
12
|
+
<field-ui label="Name">
|
|
13
|
+
<input-ui name="name"></input-ui>
|
|
14
|
+
</field-ui>
|
|
15
|
+
<field-ui label="Email">
|
|
16
|
+
<input-ui name="email" type="email"></input-ui>
|
|
17
|
+
</field-ui>
|
|
18
|
+
</col-ui>
|
|
19
|
+
</section-ui>
|
|
20
|
+
</card-ui>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Bleed
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<card-ui>
|
|
27
|
+
<header-ui>
|
|
28
|
+
<text-ui variant="title">Cover image</text-ui>
|
|
29
|
+
</header-ui>
|
|
30
|
+
<section-ui bleed>
|
|
31
|
+
<img src="cover.jpg" style="width: 100%; display: block;">
|
|
32
|
+
</section-ui>
|
|
33
|
+
<section-ui>
|
|
34
|
+
<text-ui>Caption text inside a normal padded section.</text-ui>
|
|
35
|
+
</section-ui>
|
|
36
|
+
</card-ui>
|
|
37
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# segment — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<segmented-ui>
|
|
7
|
+
<segment-ui value="overview" text="Overview"></segment-ui>
|
|
8
|
+
<segment-ui value="features" text="Features"></segment-ui>
|
|
9
|
+
<segment-ui value="pricing" text="Pricing"></segment-ui>
|
|
10
|
+
</segmented-ui>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## text
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<segmented-ui>
|
|
17
|
+
<segment-ui value="d" text="Daily"></segment-ui>
|
|
18
|
+
<segment-ui value="w" text="Weekly"></segment-ui>
|
|
19
|
+
<segment-ui value="m" text="Monthly"></segment-ui>
|
|
20
|
+
<segment-ui value="y" text="Yearly"></segment-ui>
|
|
21
|
+
</segmented-ui>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## disabled
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<segmented-ui>
|
|
28
|
+
<segment-ui value="free" text="Free"></segment-ui>
|
|
29
|
+
<segment-ui value="pro" text="Pro"></segment-ui>
|
|
30
|
+
<segment-ui value="enterprise" text="Enterprise" disabled></segment-ui>
|
|
31
|
+
</segmented-ui>
|
|
32
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# segmented — Examples
|
|
2
|
+
|
|
3
|
+
## basic (3 segments)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<segmented-ui>
|
|
7
|
+
<segment-ui value="daily" text="Daily"></segment-ui>
|
|
8
|
+
<segment-ui value="weekly" text="Weekly"></segment-ui>
|
|
9
|
+
<segment-ui value="monthly" text="Monthly"></segment-ui>
|
|
10
|
+
</segmented-ui>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## pre-selected
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<segmented-ui value="weekly">
|
|
17
|
+
<segment-ui value="daily" text="Daily"></segment-ui>
|
|
18
|
+
<segment-ui value="weekly" text="Weekly"></segment-ui>
|
|
19
|
+
<segment-ui value="monthly" text="Monthly"></segment-ui>
|
|
20
|
+
</segmented-ui>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## disabled segment
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<segmented-ui value="list">
|
|
27
|
+
<segment-ui value="list" text="List"></segment-ui>
|
|
28
|
+
<segment-ui value="grid" text="Grid"></segment-ui>
|
|
29
|
+
<segment-ui value="kanban" text="Kanban" disabled></segment-ui>
|
|
30
|
+
</segmented-ui>
|
|
31
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# select — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<field-ui label="Fruit">
|
|
7
|
+
<select-ui placeholder="Pick a fruit">
|
|
8
|
+
<option value="apple">Apple</option>
|
|
9
|
+
<option value="banana">Banana</option>
|
|
10
|
+
<option value="cherry">Cherry</option>
|
|
11
|
+
<option value="dragonfruit">Dragonfruit</option>
|
|
12
|
+
</select-ui>
|
|
13
|
+
</field-ui>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## size
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<field-ui label="Small">
|
|
20
|
+
<select-ui size="sm" placeholder="Pick a fruit">
|
|
21
|
+
<option value="apple">Apple</option>
|
|
22
|
+
<option value="banana">Banana</option>
|
|
23
|
+
<option value="cherry">Cherry</option>
|
|
24
|
+
</select-ui>
|
|
25
|
+
</field-ui>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## grouped options
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<field-ui label="Location">
|
|
32
|
+
<select-ui placeholder="Choose a city">
|
|
33
|
+
<optgroup label="North America">
|
|
34
|
+
<option value="nyc">New York</option>
|
|
35
|
+
<option value="sf">San Francisco</option>
|
|
36
|
+
<option value="toronto">Toronto</option>
|
|
37
|
+
</optgroup>
|
|
38
|
+
<optgroup label="Europe">
|
|
39
|
+
<option value="london">London</option>
|
|
40
|
+
<option value="paris">Paris</option>
|
|
41
|
+
<option value="berlin">Berlin</option>
|
|
42
|
+
</optgroup>
|
|
43
|
+
<optgroup label="Asia">
|
|
44
|
+
<option value="tokyo">Tokyo</option>
|
|
45
|
+
<option value="singapore">Singapore</option>
|
|
46
|
+
</optgroup>
|
|
47
|
+
</select-ui>
|
|
48
|
+
</field-ui>
|
|
49
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# skeleton — Examples
|
|
2
|
+
|
|
3
|
+
## width / height
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<skeleton-ui width="100px" height="1em"></skeleton-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## radius
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<skeleton-ui width="120px" height="2em" radius="none"></skeleton-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## static
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<skeleton-ui width="150px" height="1.5em"></skeleton-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# slider — Examples
|
|
2
|
+
|
|
3
|
+
## Sizes
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<slider-ui size="lg" value="60"></slider-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## value (default)
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<slider-ui value="50"></slider-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## label + value readout
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<field-ui label="Volume">
|
|
19
|
+
<slider-ui value="75"></slider-ui>
|
|
20
|
+
</field-ui>
|
|
21
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# stat — Examples
|
|
2
|
+
|
|
3
|
+
## Basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<stat-ui value="1,234" label="Total Users"></stat-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## value
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<stat-ui value="1,234" label="Users"></stat-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## label
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<stat-ui value="847" label="Active Users"></stat-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# step-progress — Examples
|
|
2
|
+
|
|
3
|
+
## value
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<step-progress-ui value="0" total="10" caption="Not started"></step-progress-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## total
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<step-progress-ui value="3" total="3" caption="Short flow"></step-progress-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## caption
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<step-progress-ui value="2" total="5"></step-progress-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# stepper — Examples
|
|
2
|
+
|
|
3
|
+
## Horizontal (default)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<stepper-ui step="2">
|
|
7
|
+
<stepper-item-ui text="Account"></stepper-item-ui>
|
|
8
|
+
<stepper-item-ui text="Details"></stepper-item-ui>
|
|
9
|
+
<stepper-item-ui text="Review"></stepper-item-ui>
|
|
10
|
+
<stepper-item-ui text="Confirm"></stepper-item-ui>
|
|
11
|
+
</stepper-ui>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Vertical
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<stepper-ui orientation="vertical" step="1">
|
|
18
|
+
<stepper-item-ui text="Select plan" description="Choose your subscription"></stepper-item-ui>
|
|
19
|
+
<stepper-item-ui text="Payment" description="Enter payment details"></stepper-item-ui>
|
|
20
|
+
<stepper-item-ui text="Confirmation" description="Review and submit"></stepper-item-ui>
|
|
21
|
+
</stepper-ui>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Interactive
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<stepper-ui id="stepper-interactive" step="1">
|
|
28
|
+
<stepper-item-ui text="Step 1"></stepper-item-ui>
|
|
29
|
+
<stepper-item-ui text="Step 2"></stepper-item-ui>
|
|
30
|
+
<stepper-item-ui text="Step 3"></stepper-item-ui>
|
|
31
|
+
<stepper-item-ui text="Step 4"></stepper-item-ui>
|
|
32
|
+
</stepper-ui>
|
|
33
|
+
<div style="display:flex; gap:var(--a-space-2); margin-top:var(--a-space-3);">
|
|
34
|
+
<button-ui id="stepper-prev" text="Previous" variant="outline"></button-ui>
|
|
35
|
+
<button-ui id="stepper-next" text="Next" variant="primary"></button-ui>
|
|
36
|
+
</div>
|
|
37
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# stream — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<stream-ui>This is static content inside a stream element. Assign an AsyncIterable to the .tokens property to begin streaming.</stream-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## hide-cursor
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<stream-ui streaming>Streaming with cursor...</stream-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## pace
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<stream-ui>Pace is set programmatically when assigning .tokens. A value of 0 renders tokens immediately; higher values create a typewriter effect.</stream-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# swatch — Examples
|
|
2
|
+
|
|
3
|
+
## shapes
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<swatch-ui shape="dot" color="var(--a-data-0)" label="Revenue"></swatch-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## sizes
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<row-ui gap="3" align="center">
|
|
13
|
+
<swatch-ui shape="dot" size="sm" color="var(--a-data-0)" label="sm"></swatch-ui>
|
|
14
|
+
<swatch-ui shape="dot" size="md" color="var(--a-data-0)" label="md"></swatch-ui>
|
|
15
|
+
<swatch-ui shape="dot" size="lg" color="var(--a-data-0)" label="lg"></swatch-ui>
|
|
16
|
+
</row-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## composition — chart-legend-ui
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<chart-legend-ui shape="dot" position="bottom" id="demo-legend-dot"></chart-legend-ui>
|
|
23
|
+
```
|