@adia-ai/web-components 0.8.13 → 0.8.14
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 +14 -0
- package/components/adia-mark/adia-mark.examples.md +3 -12
- package/components/adia-wordmark/adia-wordmark.examples.md +4 -12
- package/components/agent-artifact/agent-artifact.examples.md +0 -9
- package/components/agent-feedback-bar/agent-feedback-bar.examples.md +0 -11
- package/components/alert/alert.examples.md +1 -1
- package/components/badge/badge.examples.md +35 -4
- package/components/block/block.examples.md +5 -5
- package/components/blockquote/blockquote.examples.md +22 -0
- package/components/button/button.examples.md +4 -4
- package/components/card/card.examples.md +1 -1
- package/components/check/check.examples.md +23 -4
- package/components/col/col.examples.md +29 -0
- package/components/combobox/combobox.examples.md +9 -15
- package/components/command/command.examples.md +3 -3
- package/components/context-menu/context-menu.a2ui.json +1 -1
- package/components/context-menu/context-menu.css +3 -1
- package/components/context-menu/context-menu.examples.md +50 -0
- package/components/context-menu/context-menu.yaml +1 -1
- package/components/date-range-picker/date-range-picker.examples.md +9 -21
- package/components/datetime-picker/datetime-picker.examples.md +9 -30
- package/components/demo-toggle/demo-toggle.examples.md +1 -1
- package/components/display-field/display-field.examples.md +5 -30
- package/components/drawer/drawer.examples.md +17 -32
- package/components/field/field.examples.md +30 -11
- package/components/grid/grid.examples.md +27 -0
- package/components/heatmap/heatmap.examples.md +2 -2
- package/components/inline-edit/inline-edit.examples.md +32 -0
- package/components/integration-card/integration-card.examples.md +10 -27
- package/components/list-window/list-window.examples.md +5 -59
- package/components/loading-overlay/loading-overlay.examples.md +19 -36
- package/components/mark/mark.examples.md +62 -0
- package/components/menu/menu.css +8 -2
- package/components/nav/nav.examples.md +2 -2
- package/components/nav-group/nav-group.examples.md +2 -2
- package/components/nav-item/nav-item.css +21 -6
- package/components/noodles/noodles.examples.md +11 -11
- package/components/number-format/number-format.examples.md +19 -0
- package/components/page/page.examples.md +43 -20
- package/components/password-strength/password-strength.examples.md +28 -0
- package/components/popover/popover.css +7 -1
- package/components/preview/preview.examples.md +30 -0
- package/components/progress/progress.examples.md +3 -3
- package/components/qr-code/qr-code.examples.md +19 -0
- package/components/radio/radio.examples.md +23 -4
- package/components/relative-time/relative-time.examples.md +19 -0
- package/components/row/row.examples.md +20 -0
- package/components/skip-nav/skip-nav.examples.md +27 -0
- package/components/spinner/spinner.examples.md +5 -12
- package/components/stack/stack.examples.md +17 -0
- package/components/stat/stat.examples.md +23 -4
- package/components/swatch/swatch.examples.md +2 -2
- package/components/switch/switch.examples.md +23 -4
- package/components/table-toolbar/table-toolbar.examples.md +46 -0
- package/components/tabs/tabs.examples.md +13 -16
- package/components/tag/tag.examples.md +4 -4
- package/components/tags-input/tags-input.examples.md +6 -73
- package/components/text/text.examples.md +37 -6
- package/components/time-picker/time-picker.examples.md +3 -15
- package/components/toc/toc.examples.md +69 -0
- package/components/tour/tour.examples.md +119 -0
- package/components/visually-hidden/visually-hidden.examples.md +26 -0
- package/dist/theme-provider.min.js +6 -6
- package/dist/themes.min.css +1 -1
- package/dist/themes.sheet.js +1 -1
- package/dist/web-components.min.css +1 -1
- package/dist/web-components.sheet.js +1 -1
- package/package.json +1 -1
- package/styles/themes.css +460 -8
|
@@ -16,31 +16,54 @@
|
|
|
16
16
|
</page-ui>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## max-width · padding
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<page-ui max-width="prose" padding="6"
|
|
23
|
-
<header
|
|
24
|
-
<text-ui variant="title">
|
|
25
|
-
</header
|
|
26
|
-
<section
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
<page-ui max-width="prose" padding="6" style="border:1px solid var(--md-sys-color-neutral-outline-variant);border-radius:var(--a-radius-md)">
|
|
23
|
+
<header>
|
|
24
|
+
<text-ui variant="title">Welcome back</text-ui>
|
|
25
|
+
</header>
|
|
26
|
+
<section>
|
|
27
|
+
<text-ui>
|
|
28
|
+
Sign in to continue — the
|
|
29
|
+
<code>prose</code>
|
|
30
|
+
clamp keeps the reading column comfortable regardless of viewport width.
|
|
31
|
+
</text-ui>
|
|
32
|
+
</section>
|
|
33
|
+
<footer>
|
|
34
|
+
<button-ui text="Sign in" variant="solid"></button-ui>
|
|
35
|
+
</footer>
|
|
29
36
|
</page-ui>
|
|
30
37
|
```
|
|
31
38
|
|
|
32
|
-
##
|
|
39
|
+
## Region model — rhythm · bleed · padding
|
|
33
40
|
|
|
34
41
|
```html
|
|
35
|
-
<
|
|
36
|
-
<header
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
<page-ui max-width="wide" padding="6" style="border:1px solid var(--md-sys-color-neutral-outline-variant);border-radius:var(--a-radius-md)">
|
|
43
|
+
<header>
|
|
44
|
+
<text-ui variant="title">Dashboard</text-ui>
|
|
45
|
+
</header>
|
|
46
|
+
<section bleed style="background:var(--md-sys-color-primary-container);padding:var(--a-space-4) var(--a-space-6);">
|
|
47
|
+
<text-ui>
|
|
48
|
+
This
|
|
49
|
+
<code>[bleed]</code>
|
|
50
|
+
banner runs edge-to-edge — its background spans the full page width, past the
|
|
51
|
+
<code>padding="6"</code>
|
|
52
|
+
inset.
|
|
53
|
+
</text-ui>
|
|
54
|
+
</section>
|
|
55
|
+
<section>
|
|
56
|
+
<text-ui>A default section sits within the page inset with consistent rhythm above and below.</text-ui>
|
|
57
|
+
</section>
|
|
58
|
+
<section padding>
|
|
59
|
+
<text-ui>
|
|
60
|
+
A
|
|
61
|
+
<code>section[padding]</code>
|
|
62
|
+
is a padded sub-surface — its own background and radius, like a card body nested in the page.
|
|
63
|
+
</text-ui>
|
|
64
|
+
</section>
|
|
65
|
+
<footer>
|
|
66
|
+
<button-ui text="Save changes" variant="solid"></button-ui>
|
|
67
|
+
</footer>
|
|
68
|
+
</page-ui>
|
|
46
69
|
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# password-strength — Examples
|
|
2
|
+
|
|
3
|
+
## paired with input-ui[type=password]
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<field-ui label="Password" id="pwd-field-1">
|
|
7
|
+
<input-ui type="password" name="password" placeholder="Type to score…"></input-ui>
|
|
8
|
+
</field-ui>
|
|
9
|
+
<password-strength-ui id="pwd-meter-1"></password-strength-ui>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## score buckets (preview at each level)
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<password-strength-ui id="pwd-empty"></password-strength-ui>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## min-score (submit-button gating)
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<col-ui gap="2">
|
|
22
|
+
<field-ui label="Password" id="pwd-field-gated">
|
|
23
|
+
<input-ui type="password" name="password" placeholder="Type to unlock submit…"></input-ui>
|
|
24
|
+
</field-ui>
|
|
25
|
+
<password-strength-ui id="pwd-meter-gated" min-score="2"></password-strength-ui>
|
|
26
|
+
<button-ui id="pwd-submit-gated" variant="primary" text="Create account" disabled></button-ui>
|
|
27
|
+
</col-ui>
|
|
28
|
+
```
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
/* ── Colors (default panel chrome — opt out per `:has(>card-ui)` rule
|
|
9
9
|
below or by setting tokens to transparent / 0) ── */
|
|
10
|
-
|
|
10
|
+
/* surface-bright, not surface-dimmer: a floating overlay reads as
|
|
11
|
+
ELEVATED above the page, and elevation moves toward brighter in dark
|
|
12
|
+
mode (dimmer = neutral-925, darker than the neutral-875 page it floats
|
|
13
|
+
over — the panel read near-black). Matches select-ui's own dropdown
|
|
14
|
+
surface exactly, so the two overlays on a shell's topbar (a select
|
|
15
|
+
menu and a popover panel) sit on one plane. */
|
|
16
|
+
--popover-bg: var(--md-sys-color-neutral-surface-bright);
|
|
11
17
|
--popover-border: var(--md-sys-color-neutral-outline-variant);
|
|
12
18
|
--popover-shadow: var(--a-shadow-lg);
|
|
13
19
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# preview — Examples
|
|
2
|
+
|
|
3
|
+
## Basic — stacked (default)
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<preview-ui>
|
|
7
|
+
<button-ui text="Save" variant="primary"></button-ui>
|
|
8
|
+
<button-ui text="Cancel" variant="ghost"></button-ui>
|
|
9
|
+
</preview-ui>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## layout="split"
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<preview-ui layout="split">
|
|
16
|
+
<badge-ui text="New" variant="accent"></badge-ui>
|
|
17
|
+
<badge-ui text="Beta" variant="warning"></badge-ui>
|
|
18
|
+
<badge-ui text="Stable" variant="success"></badge-ui>
|
|
19
|
+
</preview-ui>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## code-first
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<preview-ui code-first>
|
|
26
|
+
<field-ui label="Email" hint="We'll never share it.">
|
|
27
|
+
<input-ui type="email" placeholder="you@example.com"></input-ui>
|
|
28
|
+
</field-ui>
|
|
29
|
+
</preview-ui>
|
|
30
|
+
```
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
## value
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
|
-
<progress-ui value="0"
|
|
6
|
+
<progress-ui value="0"></progress-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## indeterminate
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<progress-ui
|
|
12
|
+
<progress-ui></progress-ui>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## variant
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<progress-ui value="60" variant="bar"
|
|
18
|
+
<progress-ui value="60" variant="bar"></progress-ui>
|
|
19
19
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# qr-code — Examples
|
|
2
|
+
|
|
3
|
+
## [value] — auto-encode a string
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<qr-code-ui value="https://adia.dev"></qr-code-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## [size] — display dimensions
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<qr-code-ui value="https://example.com" size="128"></qr-code-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## [error-correction] — recovery vs. capacity tradeoff
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<qr-code-ui value="https://example.com" error-correction="L"></qr-code-ui>
|
|
19
|
+
```
|
|
@@ -6,14 +6,33 @@
|
|
|
6
6
|
<radio-ui label="Unchecked" name="demo-state"></radio-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Typography registers
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<
|
|
12
|
+
<row-ui gap="6" align="start" wrap>
|
|
13
|
+
<col-ui gap="2">
|
|
14
|
+
<text-ui variant="caption" color="muted">verse</text-ui>
|
|
15
|
+
<div verse>
|
|
16
|
+
<radio-ui label="Standard" name="reg-verse" checked></radio-ui>
|
|
17
|
+
</div>
|
|
18
|
+
</col-ui>
|
|
19
|
+
<col-ui gap="2">
|
|
20
|
+
<text-ui variant="caption" color="muted">regular</text-ui>
|
|
21
|
+
<div>
|
|
22
|
+
<radio-ui label="Standard" name="reg-regular" checked></radio-ui>
|
|
23
|
+
</div>
|
|
24
|
+
</col-ui>
|
|
25
|
+
<col-ui gap="2">
|
|
26
|
+
<text-ui variant="caption" color="muted">prose</text-ui>
|
|
27
|
+
<div prose>
|
|
28
|
+
<radio-ui label="Standard" name="reg-prose" checked></radio-ui>
|
|
29
|
+
</div>
|
|
30
|
+
</col-ui>
|
|
31
|
+
</row-ui>
|
|
13
32
|
```
|
|
14
33
|
|
|
15
|
-
##
|
|
34
|
+
## disabled
|
|
16
35
|
|
|
17
36
|
```html
|
|
18
|
-
<radio-ui label="
|
|
37
|
+
<radio-ui label="Disabled Unchecked" name="demo-dis" disabled></radio-ui>
|
|
19
38
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# relative-time — Examples
|
|
2
|
+
|
|
3
|
+
## default
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<relative-time-ui datetime="2026-05-25T11:00:00Z"></relative-time-ui>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## time-style (long | short | narrow)
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<relative-time-ui datetime="2026-05-25T09:00:00Z" time-style="long"></relative-time-ui>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## numeric (auto | always)
|
|
16
|
+
|
|
17
|
+
```html
|
|
18
|
+
<relative-time-ui datetime="2026-05-24T12:00:00Z" numeric="auto"></relative-time-ui>
|
|
19
|
+
```
|
|
@@ -9,3 +9,23 @@
|
|
|
9
9
|
<tag-ui text="Owner" size="sm"></tag-ui>
|
|
10
10
|
</row-ui>
|
|
11
11
|
```
|
|
12
|
+
|
|
13
|
+
## Rendered demos
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<row-ui gap="2">
|
|
17
|
+
<button-ui text="Cancel" variant="ghost"></button-ui>
|
|
18
|
+
<button-ui text="Save changes" variant="primary"></button-ui>
|
|
19
|
+
</row-ui>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Responsive (@bp)
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<!-- Stack on mobile (via col-ui), unwrap to a row at md+ -->
|
|
26
|
+
<!-- For row-specific @bp: vary gap or alignment by viewport -->
|
|
27
|
+
<row-ui gap="sm lg@md" align="start center@lg">
|
|
28
|
+
<button-ui text="Cancel" variant="ghost"></button-ui>
|
|
29
|
+
<button-ui text="Save" variant="primary"></button-ui>
|
|
30
|
+
</row-ui>
|
|
31
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# skip-nav — Examples
|
|
2
|
+
|
|
3
|
+
## Appearance
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<a class="skip-nav-preview" tabindex="-1" aria-hidden="true">Skip to main content</a>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Live behavior — Tab into the demo
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<input-ui placeholder="Click here, then press Tab"></input-ui>
|
|
13
|
+
<skip-nav-ui target="#demo-main-target"></skip-nav-ui>
|
|
14
|
+
<div id="demo-main-target" tabindex="-1" style="margin-top: var(--a-space-6); padding: var(--a-space-4); border: 2px dashed var(--a-primary-bg); border-radius: var(--a-radius-md);">
|
|
15
|
+
<strong>#demo-main-target</strong>
|
|
16
|
+
— the skip-link's destination. Focus moves here on Enter; you'll see the dashed accent outline activate.
|
|
17
|
+
</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Custom target + label
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Default -->
|
|
24
|
+
<skip-nav-ui></skip-nav-ui>
|
|
25
|
+
<!-- Custom target + label -->
|
|
26
|
+
<skip-nav-ui target="#article-body" text="Skip to article"></skip-nav-ui>
|
|
27
|
+
```
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
# spinner — Examples
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## variant
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
<spinner-ui></spinner-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
Canonical composition. Disable the button while the operation is in
|
|
12
|
-
progress; `tone="current"` keeps the spinner matched to the button's
|
|
13
|
-
label color.
|
|
9
|
+
## size
|
|
14
10
|
|
|
15
11
|
```html
|
|
16
|
-
<
|
|
17
|
-
<spinner-ui size="sm" tone="current" label="Saving"></spinner-ui>
|
|
18
|
-
Saving
|
|
19
|
-
</button-ui>
|
|
12
|
+
<spinner-ui size="sm"></spinner-ui>
|
|
20
13
|
```
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## paused
|
|
23
16
|
|
|
24
17
|
```html
|
|
25
|
-
<spinner-ui
|
|
18
|
+
<spinner-ui size="lg"></spinner-ui>
|
|
26
19
|
```
|
|
@@ -8,3 +8,20 @@
|
|
|
8
8
|
<badge-ui text="3" variant="solid" color="danger"></badge-ui>
|
|
9
9
|
</stack-ui>
|
|
10
10
|
```
|
|
11
|
+
|
|
12
|
+
## align
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<stack-ui align="top-left" style="width:150px;height:84px;border:1px dashed var(--md-sys-color-neutral-outline-variant);border-radius:var(--a-radius-md)">
|
|
16
|
+
<badge-ui text="top-left" variant="solid"></badge-ui>
|
|
17
|
+
</stack-ui>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rendered demos
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<stack-ui style="width:fit-content">
|
|
24
|
+
<avatar-ui text="KG" size="md"></avatar-ui>
|
|
25
|
+
<badge-ui text="3" variant="danger" style="position:absolute;top:-4px;right:-4px;"></badge-ui>
|
|
26
|
+
</stack-ui>
|
|
27
|
+
```
|
|
@@ -6,14 +6,33 @@
|
|
|
6
6
|
<stat-ui value="1,234" label="Total Users"></stat-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Typography registers
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<
|
|
12
|
+
<row-ui gap="6" align="start" wrap>
|
|
13
|
+
<col-ui gap="2">
|
|
14
|
+
<text-ui variant="caption" color="muted">verse</text-ui>
|
|
15
|
+
<div verse style="width:180px">
|
|
16
|
+
<stat-ui value="$48.2k" label="Revenue" change="+12.5%" trend="up"></stat-ui>
|
|
17
|
+
</div>
|
|
18
|
+
</col-ui>
|
|
19
|
+
<col-ui gap="2">
|
|
20
|
+
<text-ui variant="caption" color="muted">regular</text-ui>
|
|
21
|
+
<div style="width:180px">
|
|
22
|
+
<stat-ui value="$48.2k" label="Revenue" change="+12.5%" trend="up"></stat-ui>
|
|
23
|
+
</div>
|
|
24
|
+
</col-ui>
|
|
25
|
+
<col-ui gap="2">
|
|
26
|
+
<text-ui variant="caption" color="muted">prose</text-ui>
|
|
27
|
+
<div prose style="width:180px">
|
|
28
|
+
<stat-ui value="$48.2k" label="Revenue" change="+12.5%" trend="up"></stat-ui>
|
|
29
|
+
</div>
|
|
30
|
+
</col-ui>
|
|
31
|
+
</row-ui>
|
|
13
32
|
```
|
|
14
33
|
|
|
15
|
-
##
|
|
34
|
+
## value
|
|
16
35
|
|
|
17
36
|
```html
|
|
18
|
-
<stat-ui value="
|
|
37
|
+
<stat-ui value="1,234" label="Users"></stat-ui>
|
|
19
38
|
```
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
</row-ui>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## detail · copyable — design-token tile
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
|
-
<
|
|
22
|
+
<swatch-ui shape="square" size="lg" color="oklch(0.55 0.2 264)" label="primary-500" detail="oklch(0.55 0.2 264)" copyable></swatch-ui>
|
|
23
23
|
```
|
|
@@ -6,14 +6,33 @@
|
|
|
6
6
|
<switch-ui label="Off"></switch-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Typography registers
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<
|
|
12
|
+
<row-ui gap="6" align="start" wrap>
|
|
13
|
+
<col-ui gap="2">
|
|
14
|
+
<text-ui variant="caption" color="muted">verse</text-ui>
|
|
15
|
+
<div verse>
|
|
16
|
+
<switch-ui label="Enabled" checked></switch-ui>
|
|
17
|
+
</div>
|
|
18
|
+
</col-ui>
|
|
19
|
+
<col-ui gap="2">
|
|
20
|
+
<text-ui variant="caption" color="muted">regular</text-ui>
|
|
21
|
+
<div>
|
|
22
|
+
<switch-ui label="Enabled" checked></switch-ui>
|
|
23
|
+
</div>
|
|
24
|
+
</col-ui>
|
|
25
|
+
<col-ui gap="2">
|
|
26
|
+
<text-ui variant="caption" color="muted">prose</text-ui>
|
|
27
|
+
<div prose>
|
|
28
|
+
<switch-ui label="Enabled" checked></switch-ui>
|
|
29
|
+
</div>
|
|
30
|
+
</col-ui>
|
|
31
|
+
</row-ui>
|
|
13
32
|
```
|
|
14
33
|
|
|
15
|
-
##
|
|
34
|
+
## size
|
|
16
35
|
|
|
17
36
|
```html
|
|
18
|
-
<switch-ui label="
|
|
37
|
+
<switch-ui label="Small" size="sm" checked></switch-ui>
|
|
19
38
|
```
|
|
@@ -10,3 +10,49 @@
|
|
|
10
10
|
</section-ui>
|
|
11
11
|
</card-ui>
|
|
12
12
|
```
|
|
13
|
+
|
|
14
|
+
## Rendered demos
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<col-ui gap="0">
|
|
18
|
+
<table-toolbar-ui for="demo-table" text="All employees" count="32" placeholder="Search employees…"></table-toolbar-ui>
|
|
19
|
+
<card-ui>
|
|
20
|
+
<section bleed>
|
|
21
|
+
<table-ui id="demo-table" sortable raw>
|
|
22
|
+
<table>
|
|
23
|
+
<thead>
|
|
24
|
+
<tr>
|
|
25
|
+
<th>Name</th>
|
|
26
|
+
<th>Role</th>
|
|
27
|
+
<th>Status</th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>Maya Chen</td>
|
|
33
|
+
<td>Designer</td>
|
|
34
|
+
<td>
|
|
35
|
+
<tag-ui size="sm" variant="success">Active</tag-ui>
|
|
36
|
+
</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr>
|
|
39
|
+
<td>Alex Park</td>
|
|
40
|
+
<td>Engineer</td>
|
|
41
|
+
<td>
|
|
42
|
+
<tag-ui size="sm" variant="success">Active</tag-ui>
|
|
43
|
+
</td>
|
|
44
|
+
</tr>
|
|
45
|
+
<tr>
|
|
46
|
+
<td>Jordan Lee</td>
|
|
47
|
+
<td>Product</td>
|
|
48
|
+
<td>
|
|
49
|
+
<tag-ui size="sm" variant="warning">Away</tag-ui>
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
</tbody>
|
|
53
|
+
</table>
|
|
54
|
+
</table-ui>
|
|
55
|
+
</section>
|
|
56
|
+
</card-ui>
|
|
57
|
+
</col-ui>
|
|
58
|
+
```
|
|
@@ -16,6 +16,19 @@
|
|
|
16
16
|
</tabs-ui>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## variant
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<tabs-ui value="overview" variant="bordered">
|
|
23
|
+
<tab-ui value="overview" text="Overview">
|
|
24
|
+
<p>The bordered variant frames the tab strip — useful inside cards or panels.</p>
|
|
25
|
+
</tab-ui>
|
|
26
|
+
<tab-ui value="details" text="Details">
|
|
27
|
+
<p>Detailed specifications and technical information.</p>
|
|
28
|
+
</tab-ui>
|
|
29
|
+
</tabs-ui>
|
|
30
|
+
```
|
|
31
|
+
|
|
19
32
|
## with icons
|
|
20
33
|
|
|
21
34
|
```html
|
|
@@ -31,19 +44,3 @@
|
|
|
31
44
|
</tab-ui>
|
|
32
45
|
</tabs-ui>
|
|
33
46
|
```
|
|
34
|
-
|
|
35
|
-
## disabled tab
|
|
36
|
-
|
|
37
|
-
```html
|
|
38
|
-
<tabs-ui value="active">
|
|
39
|
-
<tab-ui value="active" text="Active">
|
|
40
|
-
<p>This tab is active and selectable.</p>
|
|
41
|
-
</tab-ui>
|
|
42
|
-
<tab-ui value="also-active" text="Also Active">
|
|
43
|
-
<p>This tab is also selectable.</p>
|
|
44
|
-
</tab-ui>
|
|
45
|
-
<tab-ui value="locked" text="Locked" disabled>
|
|
46
|
-
<p>This content is locked.</p>
|
|
47
|
-
</tab-ui>
|
|
48
|
-
</tabs-ui>
|
|
49
|
-
```
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
<tag-ui text="Default"></tag-ui>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## tone
|
|
10
10
|
|
|
11
11
|
```html
|
|
12
|
-
<tag-ui text="
|
|
12
|
+
<tag-ui text="Default" tone="solid"></tag-ui>
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## size
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<tag-ui text="
|
|
18
|
+
<tag-ui text="Small" size="sm"></tag-ui>
|
|
19
19
|
```
|
|
@@ -8,85 +8,18 @@
|
|
|
8
8
|
</field-ui>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Type a value + press Enter (or comma) to commit a chip. Backspace from the
|
|
12
|
-
empty inline input removes the last chip.
|
|
13
|
-
|
|
14
|
-
## pre-populated
|
|
15
|
-
|
|
16
|
-
```html
|
|
17
|
-
<tags-input-ui name="tags" value='["bug","high-priority","needs-triage"]'></tags-input-ui>
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The `value` attribute accepts JSON — `["a","b","c"]`. The form value
|
|
21
|
-
under `name` serializes back to the same JSON string.
|
|
22
|
-
|
|
23
11
|
## transform="lowercase"
|
|
24
12
|
|
|
25
13
|
```html
|
|
26
|
-
<
|
|
14
|
+
<field-ui label="Labels">
|
|
15
|
+
<tags-input-ui name="labels" transform="lowercase" placeholder="Type FOO, see foo"></tags-input-ui>
|
|
16
|
+
</field-ui>
|
|
27
17
|
```
|
|
28
18
|
|
|
29
|
-
Tokens are lowercased on commit. Available values:
|
|
30
|
-
`""` (preserve), `"lowercase"`, `"trim"`, `"strip-spaces"`.
|
|
31
|
-
|
|
32
19
|
## max — count cap
|
|
33
20
|
|
|
34
21
|
```html
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Once 3 tokens have been added, further commits fire
|
|
39
|
-
`invalid` with `detail.reason === "max"`.
|
|
40
|
-
|
|
41
|
-
## delimiter="enter"
|
|
42
|
-
|
|
43
|
-
```html
|
|
44
|
-
<tags-input-ui delimiter="enter"></tags-input-ui>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Disables in-line character commits when the token grammar legitimately
|
|
48
|
-
contains the default `,` (e.g. display names like "Doe, Jane"). Only
|
|
49
|
-
Enter (or programmatic `addToken`) commits.
|
|
50
|
-
|
|
51
|
-
## validateFn — email-format gate
|
|
52
|
-
|
|
53
|
-
```html
|
|
54
|
-
<tags-input-ui id="to" name="to" placeholder="Email…"></tags-input-ui>
|
|
55
|
-
<script>
|
|
56
|
-
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
57
|
-
document.getElementById('to').validateFn = (value) => EMAIL_RE.test(value);
|
|
58
|
-
</script>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
`validateFn` may return a `Promise<boolean>` — the host flips into
|
|
62
|
-
`[validating]` until the promise settles.
|
|
63
|
-
|
|
64
|
-
## paste-split — bulk entry
|
|
65
|
-
|
|
66
|
-
```html
|
|
67
|
-
<tags-input-ui name="domains" paste-split=",\n"></tags-input-ui>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Pasting `"example.com, foo.com\nbar.com"` commits three chips.
|
|
71
|
-
|
|
72
|
-
## suggestions — autocomplete hints
|
|
73
|
-
|
|
74
|
-
```html
|
|
75
|
-
<tags-input-ui id="tags" name="tags"></tags-input-ui>
|
|
76
|
-
<script>
|
|
77
|
-
document.getElementById('tags').suggestions = ['bug', 'feature', 'chore'];
|
|
78
|
-
</script>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Suggestions are hints, not gates — the typed value still wins. When
|
|
82
|
-
non-empty, the host announces as `role="combobox"` with the popover
|
|
83
|
-
listed below the field.
|
|
84
|
-
|
|
85
|
-
## readonly chip display
|
|
86
|
-
|
|
87
|
-
```html
|
|
88
|
-
<tags-input-ui readonly value='["bug","urgent"]'></tags-input-ui>
|
|
22
|
+
<field-ui label="Up to 3 tags">
|
|
23
|
+
<tags-input-ui name="tags" max="3" placeholder="Try adding a 4th tag" value='["one","two"]'></tags-input-ui>
|
|
24
|
+
</field-ui>
|
|
89
25
|
```
|
|
90
|
-
|
|
91
|
-
Readonly hides the remove affordance on each chip + blocks the inline
|
|
92
|
-
input.
|