@adia-ai/web-components 0.6.6 → 0.6.7
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 +16 -0
- package/USAGE.md +100 -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/custom-elements.json +9012 -0
- package/package.json +7 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# agent-reasoning — Examples
|
|
2
|
+
|
|
3
|
+
## streaming pipeline
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<div data-demo-host="streaming"></div>
|
|
7
|
+
<div style="display:flex; gap:var(--a-space-2); margin-top:var(--a-space-3);">
|
|
8
|
+
<button-ui data-replay="streaming" icon="arrow-clockwise" text="Replay" variant="outline" size="sm"></button-ui>
|
|
9
|
+
</div>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## plan + thoughts
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<div data-demo-host="plan"></div>
|
|
16
|
+
<div style="display:flex; gap:var(--a-space-2); margin-top:var(--a-space-3);">
|
|
17
|
+
<button-ui data-replay="plan" icon="arrow-clockwise" text="Replay" variant="outline" size="sm"></button-ui>
|
|
18
|
+
</div>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## iterations
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div data-demo-host="iter"></div>
|
|
25
|
+
<div style="display:flex; gap:var(--a-space-2); margin-top:var(--a-space-3);">
|
|
26
|
+
<button-ui data-replay="iter" icon="arrow-clockwise" text="Replay" variant="outline" size="sm"></button-ui>
|
|
27
|
+
</div>
|
|
28
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# agent-suggestions — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<agent-suggestions-ui id="demo-basic"></agent-suggestions-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## with icons
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<agent-suggestions-ui id="demo-icons"></agent-suggestions-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## variant="ghost"
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<agent-suggestions-ui id="demo-ghost" variant="ghost"></agent-suggestions-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# agent-trace — Examples
|
|
2
|
+
|
|
3
|
+
## pills
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<agent-trace-ui id="demo-pills"></agent-trace-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## pills + metrics
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<agent-trace-ui id="demo-metrics"></agent-trace-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## training feedback
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<agent-trace-ui id="demo-feedback"></agent-trace-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# alert — Examples
|
|
2
|
+
|
|
3
|
+
## variant
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<alert-ui text="Default alert message"></alert-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## closable
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<alert-ui text="This can be dismissed" closable></alert-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## icon
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<alert-ui text="Helpful tip" icon="info"></alert-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# aside — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<admin-shell>
|
|
7
|
+
<aside-ui slot="leading" collapsible width="panel">
|
|
8
|
+
<list-ui>
|
|
9
|
+
<list-item-ui icon="house" text="Dashboard"></list-item-ui>
|
|
10
|
+
<list-item-ui icon="cube" text="Projects"></list-item-ui>
|
|
11
|
+
<list-item-ui icon="gear" text="Settings"></list-item-ui>
|
|
12
|
+
</list-ui>
|
|
13
|
+
</aside-ui>
|
|
14
|
+
<section-ui>
|
|
15
|
+
<!-- main content -->
|
|
16
|
+
</section-ui>
|
|
17
|
+
</admin-shell>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Slot positions inside <admin-shell>
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<admin-shell>
|
|
24
|
+
<aside-ui slot="leading" collapsible width="rail">…</aside-ui>
|
|
25
|
+
<section-ui>…main content…</section-ui>
|
|
26
|
+
<aside-ui slot="trailing" width="panel">…</aside-ui>
|
|
27
|
+
</admin-shell>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Composing with <pane-ui>
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<aside-ui slot="leading" collapsible width="panel">
|
|
34
|
+
<pane-ui resizable>
|
|
35
|
+
<list-ui>…</list-ui>
|
|
36
|
+
</pane-ui>
|
|
37
|
+
</aside-ui>
|
|
38
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# avatar — Examples
|
|
2
|
+
|
|
3
|
+
## src
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<avatar-ui src="https://i.pravatar.cc/80?u=alice" text="Alice Smith"></avatar-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## size
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<avatar-ui text="XS" size="xs"></avatar-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## shape
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<avatar-ui text="Circle" shape="circle"></avatar-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# block — Examples
|
|
2
|
+
|
|
3
|
+
## padding
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<block-ui padding="none" style="border:1px dashed var(--a-border);">
|
|
7
|
+
<p>padding: none</p>
|
|
8
|
+
</block-ui>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## margin
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<div style="background:var(--a-accent-10-tint); display:inline-block;">
|
|
15
|
+
<block-ui margin="none" padding="sm" style="border:1px dashed var(--a-border); background:var(--a-canvas-bg);">
|
|
16
|
+
<p>margin: none</p>
|
|
17
|
+
</block-ui>
|
|
18
|
+
</div>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Combinations
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<div style="background:var(--a-accent-10-tint); display:inline-block;">
|
|
25
|
+
<block-ui padding="lg" margin="md" style="border:1px dashed var(--a-border); background:var(--a-canvas-bg);">
|
|
26
|
+
<p>padding: lg + margin: md</p>
|
|
27
|
+
</block-ui>
|
|
28
|
+
</div>
|
|
29
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# breadcrumb — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<breadcrumb-ui>
|
|
7
|
+
<span>Home</span>
|
|
8
|
+
<span>Components</span>
|
|
9
|
+
<span>Breadcrumb</span>
|
|
10
|
+
</breadcrumb-ui>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## custom separator
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<breadcrumb-ui separator=">">
|
|
17
|
+
<span>Home</span>
|
|
18
|
+
<span>Settings</span>
|
|
19
|
+
<span>General</span>
|
|
20
|
+
</breadcrumb-ui>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## with links
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<breadcrumb-ui>
|
|
27
|
+
<a href="#">Home</a>
|
|
28
|
+
<a href="#">Products</a>
|
|
29
|
+
<a href="#">Category</a>
|
|
30
|
+
<span>Item Detail</span>
|
|
31
|
+
</breadcrumb-ui>
|
|
32
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# button — Examples
|
|
2
|
+
|
|
3
|
+
## variant
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button-ui text="Default"></button-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## size
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<button-ui text="Small" size="sm"></button-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## icon-only
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<button-ui icon="plus" size="sm"></button-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# calendar-picker — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<calendar-picker-ui></calendar-picker-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## label
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<field-ui label="Start Date">
|
|
13
|
+
<calendar-picker-ui></calendar-picker-ui>
|
|
14
|
+
</field-ui>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Pre-selected
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<field-ui label="Birthday">
|
|
21
|
+
<calendar-picker-ui value="1990-06-15"></calendar-picker-ui>
|
|
22
|
+
</field-ui>
|
|
23
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# canvas — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<card-ui variant="outlined">
|
|
7
|
+
<section>
|
|
8
|
+
<col-ui gap="3">
|
|
9
|
+
<text-ui strong>How it works</text-ui>
|
|
10
|
+
<text-ui color="subtle">
|
|
11
|
+
The canvas creates an internal
|
|
12
|
+
<code><a2ui-root></code>
|
|
13
|
+
element. Feed it A2UI protocol messages via
|
|
14
|
+
<code>.process()</code>
|
|
15
|
+
or
|
|
16
|
+
<code>.processAll()</code>
|
|
17
|
+
, and the root renders them into live AdiaUI components. User interactions (clicks, input changes) bubble up as
|
|
18
|
+
<code>canvas-interaction</code>
|
|
19
|
+
events.
|
|
20
|
+
</text-ui>
|
|
21
|
+
</col-ui>
|
|
22
|
+
</section>
|
|
23
|
+
</card-ui>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## theme
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<card-ui variant="outlined">
|
|
30
|
+
<section>
|
|
31
|
+
<col-ui gap="2">
|
|
32
|
+
<text-ui strong>Default</text-ui>
|
|
33
|
+
<text-ui color="subtle">Inherits the page theme.</text-ui>
|
|
34
|
+
</col-ui>
|
|
35
|
+
</section>
|
|
36
|
+
</card-ui>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Version History
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<card-ui variant="outlined">
|
|
43
|
+
<section>
|
|
44
|
+
<col-ui gap="3">
|
|
45
|
+
<text-ui strong>Undo / Redo pattern</text-ui>
|
|
46
|
+
</col-ui>
|
|
47
|
+
</section>
|
|
48
|
+
</card-ui>
|
|
49
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# card — Examples
|
|
2
|
+
|
|
3
|
+
## variant
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<card-ui variant="default">
|
|
7
|
+
<section>Default card content</section>
|
|
8
|
+
</card-ui>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## size
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<card-ui size="sm">
|
|
15
|
+
<section>Small card</section>
|
|
16
|
+
</card-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## elevation
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<card-ui elevation="0">
|
|
23
|
+
<section>No shadow</section>
|
|
24
|
+
</card-ui>
|
|
25
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# chart — Examples
|
|
2
|
+
|
|
3
|
+
## Axis family
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<chart-ui id="chart-bar" type="bar" x="month" y="value"></chart-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Categorical family
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<chart-ui id="chart-pie" type="pie" x="category" y="value"></chart-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Radial family
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<chart-ui id="chart-radar" type="radar" x="skill" y="value"></chart-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# chart-legend — Examples
|
|
2
|
+
|
|
3
|
+
## shape
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<chart-legend-ui id="legend-dot" shape="dot" items='[{"key":"revenue","label":"Revenue","slot":0},{"key":"users","label":"Users","slot":1},{"key":"churn","label":"Churn","slot":2}]'></chart-legend-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## position
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<chart-legend-ui id="legend-bottom" shape="dot" position="bottom" items='[{"key":"a","label":"Series A","slot":0},{"key":"b","label":"Series B","slot":1},{"key":"c","label":"Series C","slot":2}]'></chart-legend-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## for — mirror a chart's legendData
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<div style="display:flex; flex-direction:column; gap:var(--a-space-2);">
|
|
19
|
+
<chart-ui id="demo-chart" type="multi-line" x="month" y="revenue,users,churn"></chart-ui>
|
|
20
|
+
<chart-legend-ui id="legend-for" for="demo-chart" shape="line"></chart-legend-ui>
|
|
21
|
+
</div>
|
|
22
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# chat-thread — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<chat-thread-ui>
|
|
7
|
+
<div role="user">What's the capital of France?</div>
|
|
8
|
+
<div role="assistant">The capital of France is Paris.</div>
|
|
9
|
+
</chat-thread-ui>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## streaming
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<chat-thread-ui>
|
|
16
|
+
<div role="user">Explain black holes briefly.</div>
|
|
17
|
+
<div role="assistant" streaming>A black hole is a region of spacetime where gravity is so strong that</div>
|
|
18
|
+
</chat-thread-ui>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## with input
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<chat-thread-ui>
|
|
25
|
+
<div role="user">Give me a short haiku about the ocean.</div>
|
|
26
|
+
<div role="assistant">
|
|
27
|
+
Waves whisper secrets —
|
|
28
|
+
<br>
|
|
29
|
+
the tide retreats then returns,
|
|
30
|
+
<br>
|
|
31
|
+
carrying the moon.
|
|
32
|
+
</div>
|
|
33
|
+
</chat-thread-ui>
|
|
34
|
+
<chat-input-ui placeholder="Type a message..."></chat-input-ui>
|
|
35
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# check — Examples
|
|
2
|
+
|
|
3
|
+
## checked
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<check-ui label="Unchecked"></check-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## indeterminate
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<check-ui label="Select All" indeterminate></check-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## disabled
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<check-ui label="Disabled Unchecked" disabled></check-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# code — Examples
|
|
2
|
+
|
|
3
|
+
## inline
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<p>Use to declare a variable, or call to convert iterables.</p>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## block with language
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<div class="container">
|
|
13
|
+
<field-ui label="Email">
|
|
14
|
+
<input-ui placeholder="you@example.com"></input-ui>
|
|
15
|
+
</field-ui>
|
|
16
|
+
<button-ui text="Submit" variant="primary"></button-ui>
|
|
17
|
+
</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## escape-free authoring via <template>
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<template>
|
|
24
|
+
<div class="container">
|
|
25
|
+
<field-ui label="Email">
|
|
26
|
+
<input-ui placeholder="you@example.com"></input-ui>
|
|
27
|
+
</field-ui>
|
|
28
|
+
<button-ui text="Submit" variant="primary"></button-ui>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# color-input — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<color-input-ui name="brand"></color-input-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Initial values
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<color-input-ui name="brand-blue" value="#3b82f6"></color-input-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Format — hex vs oklch
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<color-input-ui name="hex-out" format="hex" value="#3b82f6"></color-input-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# color-picker — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<color-picker-ui></color-picker-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Pre-set Colors
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<color-picker-ui value="#3b82f6"></color-picker-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## disabled
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<color-picker-ui value="#3b82f6" disabled></color-picker-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# command — Examples
|
|
2
|
+
|
|
3
|
+
## inline (not in dialog)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<command-ui placeholder="Search commands..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
|
|
7
|
+
<optgroup label="Pages">
|
|
8
|
+
<option value="home" data-icon="house">Home</option>
|
|
9
|
+
<option value="dashboard" data-icon="chart-bar">Dashboard</option>
|
|
10
|
+
<option value="settings" data-icon="gear">Settings</option>
|
|
11
|
+
</optgroup>
|
|
12
|
+
<optgroup label="Actions">
|
|
13
|
+
<option value="new" data-icon="plus">Create New</option>
|
|
14
|
+
<option value="search" data-icon="magnifying-glass">Search</option>
|
|
15
|
+
</optgroup>
|
|
16
|
+
</command-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## grouped options with icons
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<command-ui placeholder="Type a command..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
|
|
23
|
+
<optgroup label="Navigation">
|
|
24
|
+
<option value="home" data-icon="house">Go to Home</option>
|
|
25
|
+
<option value="projects" data-icon="folder">Go to Projects</option>
|
|
26
|
+
<option value="settings" data-icon="gear">Go to Settings</option>
|
|
27
|
+
<option value="profile" data-icon="user">Go to Profile</option>
|
|
28
|
+
</optgroup>
|
|
29
|
+
<optgroup label="Team">
|
|
30
|
+
<option value="members" data-icon="users">View Members</option>
|
|
31
|
+
<option value="roles" data-icon="shield">Manage Roles</option>
|
|
32
|
+
<option value="invites" data-icon="envelope">Send Invites</option>
|
|
33
|
+
</optgroup>
|
|
34
|
+
<optgroup label="Account">
|
|
35
|
+
<option value="billing" data-icon="credit-card">Billing</option>
|
|
36
|
+
<option value="logout" data-icon="sign-out">Log Out</option>
|
|
37
|
+
</optgroup>
|
|
38
|
+
</command-ui>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## with shortcuts
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<command-ui placeholder="Search..." style="width:32rem; max-height:24rem; border:1px solid var(--a-border); border-radius:var(--a-radius-lg);">
|
|
45
|
+
<optgroup label="Actions">
|
|
46
|
+
<option value="new-file" data-icon="file-plus" data-shortcut="⌘N">New File</option>
|
|
47
|
+
<option value="open" data-icon="folder-open" data-shortcut="⌘O">Open File</option>
|
|
48
|
+
<option value="save" data-icon="floppy-disk" data-shortcut="⌘S">Save</option>
|
|
49
|
+
<option value="find" data-icon="magnifying-glass" data-shortcut="⌘F">Find</option>
|
|
50
|
+
<option value="replace" data-icon="swap" data-shortcut="⌘H">Find & Replace</option>
|
|
51
|
+
</optgroup>
|
|
52
|
+
<optgroup label="View">
|
|
53
|
+
<option value="toggle-sidebar" data-icon="sidebar" data-shortcut="⌘B">Toggle Sidebar</option>
|
|
54
|
+
<option value="toggle-theme" data-icon="moon" data-shortcut="⌘D">Toggle Theme</option>
|
|
55
|
+
<option value="zen-mode" data-icon="arrows-out" data-shortcut="⌘K Z">Zen Mode</option>
|
|
56
|
+
</optgroup>
|
|
57
|
+
</command-ui>
|
|
58
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# demo-toggle — Examples
|
|
2
|
+
|
|
3
|
+
## initial
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<demo-toggle-ui label-on="With trait" label-off="Without trait" initial="off">
|
|
7
|
+
<div slot="off" style="padding:var(--a-space-4);text-align:center;color:var(--a-fg-muted);">Bare surface — no trait attached.</div>
|
|
8
|
+
<div slot="on" style="padding:var(--a-space-4);text-align:center;color:var(--a-fg);">Same surface, with trait attached.</div>
|
|
9
|
+
</demo-toggle-ui>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## labelOn / labelOff
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<demo-toggle-ui label-on="With shimmer-loading" label-off="Without shimmer-loading">
|
|
16
|
+
<div slot="off" style="padding:var(--a-space-4);">Placeholder content (no trait)</div>
|
|
17
|
+
<div slot="on" style="padding:var(--a-space-4);">Placeholder content (shimmer active)</div>
|
|
18
|
+
</demo-toggle-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# description-list — Examples
|
|
2
|
+
|
|
3
|
+
## Stacked (default)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<description-list-ui>
|
|
7
|
+
<dt>Status</dt>
|
|
8
|
+
<dd>Active</dd>
|
|
9
|
+
<dt>Plan</dt>
|
|
10
|
+
<dd>Pro</dd>
|
|
11
|
+
<dt>Renewal</dt>
|
|
12
|
+
<dd>April 14, 2027</dd>
|
|
13
|
+
</description-list-ui>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Inline
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<description-list-ui layout="inline" align="between">
|
|
20
|
+
<dt>Weight</dt>
|
|
21
|
+
<dd>2.8 lbs</dd>
|
|
22
|
+
<dt>Dimensions</dt>
|
|
23
|
+
<dd>12 × 8 × 1 in</dd>
|
|
24
|
+
<dt>Material</dt>
|
|
25
|
+
<dd>Aluminum</dd>
|
|
26
|
+
<dt>Color</dt>
|
|
27
|
+
<dd>Space gray</dd>
|
|
28
|
+
<dt>Warranty</dt>
|
|
29
|
+
<dd>1 year</dd>
|
|
30
|
+
</description-list-ui>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Programmatic
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<description-list-ui layout="inline" align="between" items='[{"term":"CPU","description":"Apple M4"},{"term":"RAM","description":"16 GB"},{"term":"Storage","description":"512 GB SSD"}]'></description-list-ui>
|
|
37
|
+
```
|