@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,31 @@
|
|
|
1
|
+
# divider — Examples
|
|
2
|
+
|
|
3
|
+
## horizontal (default)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<p>Content above the divider</p>
|
|
7
|
+
<divider-ui></divider-ui>
|
|
8
|
+
<p>Content below the divider</p>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## with label
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<button-ui text="Sign in with Google" variant="outline" style="width:100%;"></button-ui>
|
|
15
|
+
<divider-ui label="or"></divider-ui>
|
|
16
|
+
<button-ui text="Sign in with Email" variant="outline" style="width:100%;"></button-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## vertical
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<div style="display:flex; align-items:center; gap:var(--a-space-3); height:40px;">
|
|
23
|
+
<span>Home</span>
|
|
24
|
+
<divider-ui vertical></divider-ui>
|
|
25
|
+
<span>Products</span>
|
|
26
|
+
<divider-ui vertical></divider-ui>
|
|
27
|
+
<span>About</span>
|
|
28
|
+
<divider-ui vertical></divider-ui>
|
|
29
|
+
<span>Contact</span>
|
|
30
|
+
</div>
|
|
31
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# drawer — Examples
|
|
2
|
+
|
|
3
|
+
## Authoring
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<drawer-ui side="right" size="md">
|
|
7
|
+
<header>
|
|
8
|
+
<span slot="icon">
|
|
9
|
+
<avatar-ui icon="user"></avatar-ui>
|
|
10
|
+
</span>
|
|
11
|
+
<span slot="heading">
|
|
12
|
+
<text-ui strong>Profile</text-ui>
|
|
13
|
+
<badge-ui text="Pro" variant="accent"></badge-ui>
|
|
14
|
+
</span>
|
|
15
|
+
<span slot="description">
|
|
16
|
+
<text-ui color="subtle" size="sm">Update your account</text-ui>
|
|
17
|
+
</span>
|
|
18
|
+
</header>
|
|
19
|
+
<section>...</section>
|
|
20
|
+
<footer>
|
|
21
|
+
<grid-ui>
|
|
22
|
+
<button-ui text="Cancel" variant="ghost"></button-ui>
|
|
23
|
+
<button-ui text="Save" variant="primary"></button-ui>
|
|
24
|
+
</grid-ui>
|
|
25
|
+
</footer>
|
|
26
|
+
</drawer-ui>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## side
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<button-ui text="Left" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
33
|
+
<drawer-ui text="Navigation" side="left" size="sm">
|
|
34
|
+
<section>
|
|
35
|
+
<col-ui gap="1">
|
|
36
|
+
<button-ui text="Dashboard" icon="house" variant="ghost"></button-ui>
|
|
37
|
+
<button-ui text="Projects" icon="folder" variant="ghost"></button-ui>
|
|
38
|
+
<button-ui text="Settings" icon="gear" variant="ghost"></button-ui>
|
|
39
|
+
</col-ui>
|
|
40
|
+
</section>
|
|
41
|
+
</drawer-ui>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## size
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<button-ui text="Small" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
48
|
+
<drawer-ui text="Filters" side="right" size="sm">
|
|
49
|
+
<section>
|
|
50
|
+
<col-ui gap="2">
|
|
51
|
+
<field-ui label="In stock" inline>
|
|
52
|
+
<check-ui checked></check-ui>
|
|
53
|
+
</field-ui>
|
|
54
|
+
<field-ui label="On sale" inline>
|
|
55
|
+
<check-ui></check-ui>
|
|
56
|
+
</field-ui>
|
|
57
|
+
<field-ui label="Free shipping" inline>
|
|
58
|
+
<check-ui></check-ui>
|
|
59
|
+
</field-ui>
|
|
60
|
+
</col-ui>
|
|
61
|
+
</section>
|
|
62
|
+
</drawer-ui>
|
|
63
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# embed — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<embed-ui src="https://example.com"></embed-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## aspect
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<embed-ui src="https://example.com" aspect="16/9"></embed-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## height
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<embed-ui src="https://example.com" height="250"></embed-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# empty-state — Examples
|
|
2
|
+
|
|
3
|
+
## Basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<empty-state-ui heading="No items" description="There are no items to display yet."></empty-state-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## With Icon
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<empty-state-ui icon="magnifying-glass" heading="No results" description="Try adjusting your search or filter criteria."></empty-state-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## With Action
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<empty-state-ui icon="plus-circle" heading="No projects" description="Create your first project to get started.">
|
|
19
|
+
<button-ui slot="action" text="Create Project" variant="primary"></button-ui>
|
|
20
|
+
</empty-state-ui>
|
|
21
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# feed — Examples
|
|
2
|
+
|
|
3
|
+
## text
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button-ui text="Post 'Saved.'" variant="outline" size="sm" onclick="customElements.whenDefined('feed-ui').then(()=>import('/packages/web-components/components/feed/feed.js').then(m=>m.UIFeed.post({text:'Saved.',variant:'success'})))"></button-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## variant
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<button-ui text="Default" variant="outline" size="sm" onclick="import('/packages/web-components/components/feed/feed.js').then(m=>m.UIFeed.post({text:'Default notification',variant:'default'}))"></button-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## position
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<button-ui text="Top Left" variant="outline" size="sm" onclick="import('/packages/web-components/components/feed/feed.js').then(m=>m.UIFeed.post({text:'Top left',variant:'info',position:'top-left'}))"></button-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# field — Examples
|
|
2
|
+
|
|
3
|
+
## Default layout
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<field-ui label="Email">
|
|
7
|
+
<input-ui type="email" placeholder="you@example.com"></input-ui>
|
|
8
|
+
</field-ui>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Inline layout
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<field-ui inline label="Search">
|
|
15
|
+
<input-ui type="search" placeholder="Type a command…"></input-ui>
|
|
16
|
+
</field-ui>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Any form control
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<field-ui label="Priority">
|
|
23
|
+
<select-ui>
|
|
24
|
+
<option value="low">Low</option>
|
|
25
|
+
<option value="med" selected>Medium</option>
|
|
26
|
+
<option value="high">High</option>
|
|
27
|
+
</select-ui>
|
|
28
|
+
</field-ui>
|
|
29
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# fields — Examples
|
|
2
|
+
|
|
3
|
+
## default — stacked
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<fields-ui>
|
|
7
|
+
<field-ui label="Name">
|
|
8
|
+
<input-ui type="text" placeholder="Jane Doe"></input-ui>
|
|
9
|
+
</field-ui>
|
|
10
|
+
<field-ui label="Email">
|
|
11
|
+
<input-ui type="email" placeholder="jane@example.com"></input-ui>
|
|
12
|
+
</field-ui>
|
|
13
|
+
</fields-ui>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## rows — 3-up
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<fields-ui>
|
|
20
|
+
<field-ui label="Status" rows="2">
|
|
21
|
+
<select-ui value="todo">
|
|
22
|
+
<option value="todo">To do</option>
|
|
23
|
+
<option value="doing">Doing</option>
|
|
24
|
+
<option value="done">Done</option>
|
|
25
|
+
</select-ui>
|
|
26
|
+
</field-ui>
|
|
27
|
+
<field-ui label="Priority" rows="2">
|
|
28
|
+
<select-ui value="0">
|
|
29
|
+
<option value="0">Normal</option>
|
|
30
|
+
<option value="1">High</option>
|
|
31
|
+
<option value="2">Urgent</option>
|
|
32
|
+
</select-ui>
|
|
33
|
+
</field-ui>
|
|
34
|
+
<field-ui label="Group" rows="2">
|
|
35
|
+
<select-ui value="alpha">
|
|
36
|
+
<option value="alpha">Alpha</option>
|
|
37
|
+
<option value="beta">Beta</option>
|
|
38
|
+
</select-ui>
|
|
39
|
+
</field-ui>
|
|
40
|
+
</fields-ui>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## inline
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<fields-ui inline>
|
|
47
|
+
<field-ui label="Search">
|
|
48
|
+
<input-ui type="search" placeholder="Type to search…"></input-ui>
|
|
49
|
+
</field-ui>
|
|
50
|
+
<field-ui label="Kind">
|
|
51
|
+
<select-ui value="all">
|
|
52
|
+
<option value="all">All</option>
|
|
53
|
+
<option value="docs">Docs</option>
|
|
54
|
+
<option value="components">Components</option>
|
|
55
|
+
</select-ui>
|
|
56
|
+
</field-ui>
|
|
57
|
+
</fields-ui>
|
|
58
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# footer — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<modal-ui open>
|
|
7
|
+
<header-ui>
|
|
8
|
+
<text-ui variant="title">Confirm action</text-ui>
|
|
9
|
+
</header-ui>
|
|
10
|
+
<section-ui>
|
|
11
|
+
<text-ui>Are you sure?</text-ui>
|
|
12
|
+
</section-ui>
|
|
13
|
+
<footer-ui justify="end">
|
|
14
|
+
<button-ui text="Cancel" variant="ghost"></button-ui>
|
|
15
|
+
<button-ui text="Confirm" variant="solid"></button-ui>
|
|
16
|
+
</footer-ui>
|
|
17
|
+
</modal-ui>
|
|
18
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# grid — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<grid-ui columns="3" gap="4">
|
|
7
|
+
<card-ui>…</card-ui>
|
|
8
|
+
<card-ui>…</card-ui>
|
|
9
|
+
<card-ui>…</card-ui>
|
|
10
|
+
</grid-ui>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Asymmetric layouts via [span]
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<!-- 2:1 split -->
|
|
17
|
+
<grid-ui columns="3" gap="4">
|
|
18
|
+
<card-ui span="2">Main panel</card-ui>
|
|
19
|
+
<card-ui>Side panel</card-ui>
|
|
20
|
+
</grid-ui>
|
|
21
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# header — Examples
|
|
2
|
+
|
|
3
|
+
## Basic usage
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<card-ui>
|
|
7
|
+
<header-ui>
|
|
8
|
+
<text-ui variant="title">Card title</text-ui>
|
|
9
|
+
<button-ui slot="action" icon="dots-three" variant="ghost" size="sm"></button-ui>
|
|
10
|
+
</header-ui>
|
|
11
|
+
<section-ui>
|
|
12
|
+
<text-ui>Card body content.</text-ui>
|
|
13
|
+
</section-ui>
|
|
14
|
+
</card-ui>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Inside different container parents
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<!-- Card: padded, bordered bottom -->
|
|
21
|
+
<card-ui>
|
|
22
|
+
<header-ui>…</header-ui>
|
|
23
|
+
</card-ui>
|
|
24
|
+
<!-- Drawer: padded, sticky -->
|
|
25
|
+
<drawer-ui open>
|
|
26
|
+
<header-ui>…</header-ui>
|
|
27
|
+
</drawer-ui>
|
|
28
|
+
<!-- Page: prose-aligned, optional sticky-header sentinel -->
|
|
29
|
+
<page-ui sticky-header>
|
|
30
|
+
<header-ui>…</header-ui>
|
|
31
|
+
</page-ui>
|
|
32
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# heatmap — Examples
|
|
2
|
+
|
|
3
|
+
## day-grid (GitHub contributions)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<heatmap-ui id="hm-days" type="day-grid" rows="7" cols="52" start-date="2025-01-01" color-scheme="data-ramp"></heatmap-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## matrix
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<heatmap-ui id="hm-matrix" type="matrix" rows="7" cols="12" color-scheme="accent"></heatmap-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Data stream (data-stream-*)
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<heatmap-ui type="matrix" rows="5" cols="4" color-scheme="accent" aria-label="Commit activity from activity.json" data-stream-src="/site/mock/activity.json"></heatmap-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# icon — Examples
|
|
2
|
+
|
|
3
|
+
## name
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<icon-ui name="gear"></icon-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## size
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<icon-ui name="star" size="xs"></icon-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## label
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<icon-ui name="bell" label="Notifications"></icon-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# image — Examples
|
|
2
|
+
|
|
3
|
+
## Default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<image-ui src="https://picsum.photos/seed/img-demo/300/200" alt="Sample landscape" width="300" height="200"></image-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## radius
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<image-ui src="https://picsum.photos/seed/r-sm/150/150" alt="Small radius" width="150" height="150" radius="sm"></image-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## fit
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<image-ui src="https://picsum.photos/seed/fit-cover/400/200" alt="Cover" width="200" height="200" fit="cover" radius="md"></image-ui>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# input — Examples
|
|
2
|
+
|
|
3
|
+
## label
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<input-ui label="Label" placeholder="Input value"></input-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## size
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<field-ui label="Small">
|
|
13
|
+
<input-ui size="sm" placeholder="Enter a value"></input-ui>
|
|
14
|
+
</field-ui>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## placeholder
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<input-ui placeholder="Search..."></input-ui>
|
|
21
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# inspector — Examples
|
|
2
|
+
|
|
3
|
+
## default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<inspector-ui>{
|
|
7
|
+
"name": "Alex",
|
|
8
|
+
"role": "admin",
|
|
9
|
+
"active": true
|
|
10
|
+
}</inspector-ui>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## nested
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<inspector-ui>{
|
|
17
|
+
"user": { "id": 1, "name": "Jane" },
|
|
18
|
+
"settings": { "theme": "dark", "notifications": true },
|
|
19
|
+
"tags": ["admin", "beta"]
|
|
20
|
+
}</inspector-ui>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## value
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<inspector-ui value="catalog"></inspector-ui>
|
|
27
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# kbd — Examples
|
|
2
|
+
|
|
3
|
+
## Single Keys
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<kbd-ui>⌘</kbd-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Combinations
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<span style="display:inline-flex; gap:var(--a-space-1); align-items:center;">
|
|
13
|
+
<kbd-ui>⌘</kbd-ui>
|
|
14
|
+
<kbd-ui>K</kbd-ui>
|
|
15
|
+
</span>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## In-Context
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<p style="margin:0;">
|
|
22
|
+
Press
|
|
23
|
+
<kbd-ui>⌘</kbd-ui>
|
|
24
|
+
<kbd-ui>K</kbd-ui>
|
|
25
|
+
to open the command palette, or
|
|
26
|
+
<kbd-ui>⎋</kbd-ui>
|
|
27
|
+
to close it.
|
|
28
|
+
</p>
|
|
29
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# link — Examples
|
|
2
|
+
|
|
3
|
+
## variant
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<link-ui text="Default" href="#"></link-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## inline in prose
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<text-ui>
|
|
13
|
+
I agree to the
|
|
14
|
+
<link-ui text="Terms of Service" href="#terms"></link-ui>
|
|
15
|
+
and
|
|
16
|
+
<link-ui text="Privacy Policy" href="#privacy"></link-ui>
|
|
17
|
+
.
|
|
18
|
+
</text-ui>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## target
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<link-ui text="External link" href="https://example.com" target="_blank"></link-ui>
|
|
25
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# list — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<list-ui>
|
|
7
|
+
<list-item-ui text="Dashboard"></list-item-ui>
|
|
8
|
+
<list-item-ui text="Settings"></list-item-ui>
|
|
9
|
+
<list-item-ui text="Profile"></list-item-ui>
|
|
10
|
+
<list-item-ui text="Log out"></list-item-ui>
|
|
11
|
+
</list-ui>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## with icons
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<list-ui>
|
|
18
|
+
<list-item-ui icon="house" text="Home"></list-item-ui>
|
|
19
|
+
<list-item-ui icon="gear" text="Settings"></list-item-ui>
|
|
20
|
+
<list-item-ui icon="user" text="Profile"></list-item-ui>
|
|
21
|
+
<list-item-ui icon="sign-out" text="Log out"></list-item-ui>
|
|
22
|
+
</list-ui>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## with descriptions
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<list-ui>
|
|
29
|
+
<list-item-ui icon="envelope" text="Email" description="Receive notifications via email"></list-item-ui>
|
|
30
|
+
<list-item-ui icon="bell" text="Push" description="Browser push notifications"></list-item-ui>
|
|
31
|
+
<list-item-ui icon="chat-circle" text="SMS" description="Text message alerts"></list-item-ui>
|
|
32
|
+
</list-ui>
|
|
33
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# menu — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<menu-ui>
|
|
7
|
+
<button-ui slot="trigger" text="Actions" variant="outline"></button-ui>
|
|
8
|
+
<menu-item-ui text="Edit" value="edit"></menu-item-ui>
|
|
9
|
+
<menu-item-ui text="Duplicate" value="duplicate"></menu-item-ui>
|
|
10
|
+
<menu-item-ui text="Archive" value="archive"></menu-item-ui>
|
|
11
|
+
</menu-ui>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## with icons
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<menu-ui>
|
|
18
|
+
<button-ui slot="trigger" icon="dots-three-vertical" variant="ghost"></button-ui>
|
|
19
|
+
<menu-item-ui icon="pencil" text="Edit" value="edit"></menu-item-ui>
|
|
20
|
+
<menu-item-ui icon="copy" text="Duplicate" value="duplicate"></menu-item-ui>
|
|
21
|
+
<menu-item-ui icon="download" text="Download" value="download"></menu-item-ui>
|
|
22
|
+
</menu-ui>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## with divider
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<menu-ui>
|
|
29
|
+
<button-ui slot="trigger" text="File" variant="outline"></button-ui>
|
|
30
|
+
<menu-item-ui icon="file-plus" text="New" value="new"></menu-item-ui>
|
|
31
|
+
<menu-item-ui icon="folder-open" text="Open" value="open"></menu-item-ui>
|
|
32
|
+
<menu-item-ui icon="floppy-disk" text="Save" value="save"></menu-item-ui>
|
|
33
|
+
<menu-divider-ui></menu-divider-ui>
|
|
34
|
+
<menu-item-ui icon="export" text="Export" value="export"></menu-item-ui>
|
|
35
|
+
<menu-item-ui icon="printer" text="Print" value="print"></menu-item-ui>
|
|
36
|
+
</menu-ui>
|
|
37
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# modal — Examples
|
|
2
|
+
|
|
3
|
+
## basic
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button-ui text="Open Modal" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
7
|
+
<modal-ui text="Confirm Action">
|
|
8
|
+
<p>Are you sure you want to proceed? This action requires your confirmation.</p>
|
|
9
|
+
<div slot="footer" style="display:flex; gap:var(--a-space-2); justify-content:flex-end;">
|
|
10
|
+
<button-ui text="Cancel" variant="ghost" onclick="this.closest('modal-ui').open=false"></button-ui>
|
|
11
|
+
<button-ui text="Confirm" variant="primary" onclick="this.closest('modal-ui').open=false"></button-ui>
|
|
12
|
+
</div>
|
|
13
|
+
</modal-ui>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## size
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<button-ui text="Small" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
20
|
+
<modal-ui text="Small Modal" size="sm">
|
|
21
|
+
<p>A compact modal for simple confirmations.</p>
|
|
22
|
+
</modal-ui>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## text
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<button-ui text="With Title" variant="outline" onclick="this.nextElementSibling.open=true"></button-ui>
|
|
29
|
+
<modal-ui text="Edit Profile">
|
|
30
|
+
<div style="display:flex; flex-direction:column; gap:var(--a-space-3);">
|
|
31
|
+
<field-ui label="Name">
|
|
32
|
+
<input-ui placeholder="Your name"></input-ui>
|
|
33
|
+
</field-ui>
|
|
34
|
+
<field-ui label="Email">
|
|
35
|
+
<input-ui placeholder="you@example.com"></input-ui>
|
|
36
|
+
</field-ui>
|
|
37
|
+
</div>
|
|
38
|
+
<div slot="footer" style="display:flex; gap:var(--a-space-2); justify-content:flex-end;">
|
|
39
|
+
<button-ui text="Cancel" variant="ghost" onclick="this.closest('modal-ui').open=false"></button-ui>
|
|
40
|
+
<button-ui text="Save" variant="primary" onclick="this.closest('modal-ui').open=false"></button-ui>
|
|
41
|
+
</div>
|
|
42
|
+
</modal-ui>
|
|
43
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# nav — Examples
|
|
2
|
+
|
|
3
|
+
## variant — primary
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<nav-ui style="width:240px;height:280px;border:1px solid var(--a-border);border-radius:var(--a-radius-md);padding:var(--a-space-2);">
|
|
7
|
+
<nav-item-ui text="Dashboard" icon="house" value="dashboard" selected></nav-item-ui>
|
|
8
|
+
<nav-item-ui text="Reports" icon="chart-bar" value="reports"></nav-item-ui>
|
|
9
|
+
<nav-group-ui text="Settings" icon="gear">
|
|
10
|
+
<nav-item-ui text="Profile" value="settings/profile"></nav-item-ui>
|
|
11
|
+
<nav-item-ui text="Billing" value="settings/billing"></nav-item-ui>
|
|
12
|
+
<nav-item-ui text="Team" value="settings/team"></nav-item-ui>
|
|
13
|
+
</nav-group-ui>
|
|
14
|
+
</nav-ui>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## variant — section
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<nav-ui variant="section" heading="Documentation" style="width:240px;">
|
|
21
|
+
<nav-item-ui text="Overview" value="docs/overview" selected></nav-item-ui>
|
|
22
|
+
<nav-item-ui text="Quickstart" value="docs/quickstart"></nav-item-ui>
|
|
23
|
+
<nav-item-ui text="API reference" value="docs/api"></nav-item-ui>
|
|
24
|
+
<nav-item-ui text="Examples" value="docs/examples"></nav-item-ui>
|
|
25
|
+
</nav-ui>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## collapsed
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<nav-ui collapsed style="width:64px;height:280px;border:1px solid var(--a-border);border-radius:var(--a-radius-md);padding:var(--a-space-2);">
|
|
32
|
+
<nav-item-ui text="Dashboard" icon="house" value="dashboard" selected></nav-item-ui>
|
|
33
|
+
<nav-item-ui text="Reports" icon="chart-bar" value="reports"></nav-item-ui>
|
|
34
|
+
<nav-group-ui text="Settings" icon="gear">
|
|
35
|
+
<nav-item-ui text="Profile" value="settings/profile"></nav-item-ui>
|
|
36
|
+
<nav-item-ui text="Billing" value="settings/billing"></nav-item-ui>
|
|
37
|
+
</nav-group-ui>
|
|
38
|
+
</nav-ui>
|
|
39
|
+
```
|