@adia-ai/web-components 0.8.13 → 0.8.15

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/adia-mark/adia-mark.examples.md +3 -12
  3. package/components/adia-wordmark/adia-wordmark.examples.md +4 -12
  4. package/components/agent-artifact/agent-artifact.examples.md +0 -9
  5. package/components/agent-feedback-bar/agent-feedback-bar.examples.md +0 -11
  6. package/components/alert/alert.examples.md +1 -1
  7. package/components/badge/badge.examples.md +35 -4
  8. package/components/block/block.examples.md +5 -5
  9. package/components/blockquote/blockquote.examples.md +22 -0
  10. package/components/button/button.css +10 -4
  11. package/components/button/button.examples.md +4 -4
  12. package/components/card/card.examples.md +1 -1
  13. package/components/check/check.examples.md +23 -4
  14. package/components/col/col.examples.md +29 -0
  15. package/components/combobox/combobox.examples.md +9 -15
  16. package/components/command/command.examples.md +3 -3
  17. package/components/context-menu/context-menu.a2ui.json +1 -1
  18. package/components/context-menu/context-menu.css +3 -1
  19. package/components/context-menu/context-menu.examples.md +50 -0
  20. package/components/context-menu/context-menu.yaml +1 -1
  21. package/components/date-range-picker/date-range-picker.examples.md +9 -21
  22. package/components/datetime-picker/datetime-picker.examples.md +9 -30
  23. package/components/demo-toggle/demo-toggle.examples.md +1 -1
  24. package/components/display-field/display-field.examples.md +5 -30
  25. package/components/drawer/drawer.examples.md +17 -32
  26. package/components/field/field.examples.md +30 -11
  27. package/components/grid/grid.examples.md +27 -0
  28. package/components/heatmap/heatmap.examples.md +2 -2
  29. package/components/inline-edit/inline-edit.examples.md +32 -0
  30. package/components/integration-card/integration-card.examples.md +10 -27
  31. package/components/list-window/list-window.examples.md +5 -59
  32. package/components/loading-overlay/loading-overlay.examples.md +19 -36
  33. package/components/mark/mark.examples.md +62 -0
  34. package/components/menu/menu.css +8 -2
  35. package/components/nav/nav.examples.md +2 -2
  36. package/components/nav-group/nav-group.examples.md +2 -2
  37. package/components/nav-item/nav-item.css +21 -6
  38. package/components/noodles/noodles.examples.md +11 -11
  39. package/components/number-format/number-format.examples.md +19 -0
  40. package/components/page/page.examples.md +43 -20
  41. package/components/password-strength/password-strength.examples.md +28 -0
  42. package/components/popover/popover.css +7 -1
  43. package/components/preview/preview.examples.md +30 -0
  44. package/components/progress/progress.examples.md +3 -3
  45. package/components/qr-code/qr-code.examples.md +19 -0
  46. package/components/radio/radio.examples.md +23 -4
  47. package/components/relative-time/relative-time.examples.md +19 -0
  48. package/components/row/row.examples.md +20 -0
  49. package/components/skip-nav/skip-nav.examples.md +27 -0
  50. package/components/spinner/spinner.examples.md +5 -12
  51. package/components/stack/stack.examples.md +17 -0
  52. package/components/stat/stat.examples.md +23 -4
  53. package/components/swatch/swatch.examples.md +2 -2
  54. package/components/switch/switch.examples.md +23 -4
  55. package/components/table-toolbar/table-toolbar.examples.md +46 -0
  56. package/components/tabs/tabs.examples.md +13 -16
  57. package/components/tag/tag.examples.md +4 -4
  58. package/components/tags-input/tags-input.examples.md +6 -73
  59. package/components/text/text.examples.md +37 -6
  60. package/components/time-picker/time-picker.examples.md +3 -15
  61. package/components/toc/toc.examples.md +69 -0
  62. package/components/tour/tour.examples.md +119 -0
  63. package/components/visually-hidden/visually-hidden.examples.md +26 -0
  64. package/dist/host.min.css +1 -1
  65. package/dist/host.sheet.js +1 -1
  66. package/dist/theme-provider.min.js +6 -6
  67. package/dist/themes.min.css +1 -1
  68. package/dist/themes.sheet.js +1 -1
  69. package/dist/web-components.min.css +1 -1
  70. package/dist/web-components.sheet.js +1 -1
  71. package/package.json +1 -1
  72. package/styles/colors/material-static.css +8 -8
  73. package/styles/themes.css +460 -8
@@ -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
- <tags-input-ui transform="lowercase"></tags-input-ui>
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
- <tags-input-ui name="tags" max="3"></tags-input-ui>
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.
@@ -1,19 +1,50 @@
1
1
  # text — Examples
2
2
 
3
- ## Type Scale
3
+ ## variant
4
4
 
5
5
  ```html
6
- <text-ui variant="kicker">Kicker — Eyebrow / Overline</text-ui>
6
+ <text-ui variant="display">Display</text-ui>
7
7
  ```
8
8
 
9
- ## Supplementary Type Scale
9
+ ## Typography registers
10
10
 
11
11
  ```html
12
- <text-ui variant="subsection">Subsection a sub-grouping inside a heading section</text-ui>
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="max-width:240px">
16
+ <col-ui gap="2">
17
+ <text-ui variant="heading">Heading</text-ui>
18
+ <text-ui variant="body">Body copy showing how this register sizes running text and the leading between lines.</text-ui>
19
+ <text-ui variant="caption" color="muted">Caption · metadata</text-ui>
20
+ </col-ui>
21
+ </div>
22
+ </col-ui>
23
+ <col-ui gap="2">
24
+ <text-ui variant="caption" color="muted">regular</text-ui>
25
+ <div style="max-width:240px">
26
+ <col-ui gap="2">
27
+ <text-ui variant="heading">Heading</text-ui>
28
+ <text-ui variant="body">Body copy showing how this register sizes running text and the leading between lines.</text-ui>
29
+ <text-ui variant="caption" color="muted">Caption · metadata</text-ui>
30
+ </col-ui>
31
+ </div>
32
+ </col-ui>
33
+ <col-ui gap="2">
34
+ <text-ui variant="caption" color="muted">prose</text-ui>
35
+ <div prose style="max-width:240px">
36
+ <col-ui gap="2">
37
+ <text-ui variant="heading">Heading</text-ui>
38
+ <text-ui variant="body">Body copy showing how this register sizes running text and the leading between lines.</text-ui>
39
+ <text-ui variant="caption" color="muted">Caption · metadata</text-ui>
40
+ </col-ui>
41
+ </div>
42
+ </col-ui>
43
+ </row-ui>
13
44
  ```
14
45
 
15
- ## Page Context
46
+ ## color
16
47
 
17
48
  ```html
18
- <text-ui variant="kicker">Getting Started</text-ui>
49
+ <text-ui color="subtle">Subtle</text-ui>
19
50
  ```
@@ -14,22 +14,10 @@
14
14
  </field-ui>
15
15
  ```
16
16
 
17
- ## 15-minute step
17
+ ## step
18
18
 
19
19
  ```html
20
- <field-ui label="Meeting">
21
- <time-picker-ui value="09:30" step="900"></time-picker-ui>
20
+ <field-ui label="Default">
21
+ <time-picker-ui value="09:30"></time-picker-ui>
22
22
  </field-ui>
23
23
  ```
24
-
25
- ## Second precision
26
-
27
- ```html
28
- <time-picker-ui precision="second" step="1" value="14:30:45"></time-picker-ui>
29
- ```
30
-
31
- ## 12-hour cycle
32
-
33
- ```html
34
- <time-picker-ui hour-cycle="h12" value="07:00"></time-picker-ui>
35
- ```
@@ -0,0 +1,69 @@
1
+ # toc — Examples
2
+
3
+ ## default (scans parent)
4
+
5
+ ```html
6
+ <row-ui gap="6" align="start">
7
+ <div style="position: sticky; top: var(--a-space-4); min-width: 200px;">
8
+ <toc-ui target="#example-article-1"></toc-ui>
9
+ </div>
10
+ <article id="example-article-1" style="max-width: 56ch;">
11
+ <h2 id="intro">Introduction</h2>
12
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
13
+ <h3>Why this matters</h3>
14
+ <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.</p>
15
+ <h3>What's included</h3>
16
+ <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto.</p>
17
+ <h2 id="setup">Setup</h2>
18
+ <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati.</p>
19
+ <h3>Installation</h3>
20
+ <p>Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.</p>
21
+ <h3>Configuration</h3>
22
+ <p>Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.</p>
23
+ <h2 id="api">API reference</h2>
24
+ <p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p>
25
+ <h3>Methods</h3>
26
+ <p>Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt.</p>
27
+ <h3>Events</h3>
28
+ <p>Ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam.</p>
29
+ <h2 id="conclude">Conclusion</h2>
30
+ <p>Nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur.</p>
31
+ </article>
32
+ </row-ui>
33
+ ```
34
+
35
+ ## [headings] — custom depth coverage
36
+
37
+ ```html
38
+ <row-ui gap="6" align="start">
39
+ <div style="min-width: 200px;">
40
+ <toc-ui target="#example-article-flat" headings="h2"></toc-ui>
41
+ </div>
42
+ <article id="example-article-flat" style="max-width: 40ch;">
43
+ <h2>Overview</h2>
44
+ <p>Body.</p>
45
+ <h3>Sub-section (ignored)</h3>
46
+ <p>Body.</p>
47
+ <h2>Usage</h2>
48
+ <p>Body.</p>
49
+ <h2>API</h2>
50
+ <p>Body.</p>
51
+ </article>
52
+ </row-ui>
53
+ ```
54
+
55
+ ## [offset] — adjust for sticky topbars
56
+
57
+ ```html
58
+ <row-ui gap="6" align="start">
59
+ <div style="min-width: 200px;">
60
+ <toc-ui target="#example-article-offset" offset="120"></toc-ui>
61
+ </div>
62
+ <article id="example-article-offset" style="max-width: 40ch;">
63
+ <h2 id="ofs-a">Section A</h2>
64
+ <p>Lorem.</p>
65
+ <h2 id="ofs-b">Section B</h2>
66
+ <p>Ipsum.</p>
67
+ </article>
68
+ </row-ui>
69
+ ```
@@ -0,0 +1,119 @@
1
+ # tour — Examples
2
+
3
+ ## Basic tour
4
+
5
+ ```html
6
+ <!-- Mini "dashboard" — three labelled cards that the tour highlights. -->
7
+ <col-ui gap="3">
8
+ <button-ui id="tour-basic-start" text="Take the tour" variant="primary"></button-ui>
9
+ <grid-ui columns="3" gap="3">
10
+ <card-ui id="demo-tour-target-stats" data-tour-anchor>
11
+ <header>
12
+ <span slot="heading">
13
+ <text-ui strong>Active users</text-ui>
14
+ </span>
15
+ </header>
16
+ <section>
17
+ <stat-ui label="This week" value="1,243" change="+12%" trend="up"></stat-ui>
18
+ </section>
19
+ </card-ui>
20
+ <card-ui id="demo-tour-target-filters" data-tour-anchor>
21
+ <header>
22
+ <span slot="heading">
23
+ <text-ui strong>Filters</text-ui>
24
+ </span>
25
+ </header>
26
+ <section>
27
+ <col-ui gap="2">
28
+ <select-ui value="all">
29
+ <option value="all">All teams</option>
30
+ <option value="core">Core</option>
31
+ </select-ui>
32
+ <select-ui value="week">
33
+ <option value="week">This week</option>
34
+ <option value="month">This month</option>
35
+ </select-ui>
36
+ </col-ui>
37
+ </section>
38
+ </card-ui>
39
+ <card-ui id="demo-tour-target-export" data-tour-anchor>
40
+ <header>
41
+ <span slot="heading">
42
+ <text-ui strong>Export</text-ui>
43
+ </span>
44
+ </header>
45
+ <section>
46
+ <button-ui text="Download CSV" variant="outline" icon-leading="download"></button-ui>
47
+ </section>
48
+ </card-ui>
49
+ </grid-ui>
50
+ <tour-ui id="tour-basic">
51
+ <tour-step-ui target="#demo-tour-target-stats" title="Your activity" placement="bottom">See your latest activity metrics here — visit count, signups, and week-over-week trend.</tour-step-ui>
52
+ <tour-step-ui target="#demo-tour-target-filters" title="Narrow it down" placement="bottom">Filter by team or time range to focus on what matters. Changes apply immediately.</tour-step-ui>
53
+ <tour-step-ui target="#demo-tour-target-export" title="Export anytime" placement="bottom">Download a CSV of the current view — filters are preserved in the export.</tour-step-ui>
54
+ </tour-ui>
55
+ </col-ui>
56
+ ```
57
+
58
+ ## Popover placement
59
+
60
+ ```html
61
+ <col-ui gap="3">
62
+ <button-ui id="tour-place-start" text="Tour the corners" variant="outline"></button-ui>
63
+ <grid-ui columns="2" gap="3">
64
+ <card-ui id="demo-tour-tl">
65
+ <section>
66
+ <text-ui strong>Top-left card</text-ui>
67
+ </section>
68
+ </card-ui>
69
+ <card-ui id="demo-tour-tr">
70
+ <section>
71
+ <text-ui strong>Top-right card</text-ui>
72
+ </section>
73
+ </card-ui>
74
+ <card-ui id="demo-tour-bl">
75
+ <section>
76
+ <text-ui strong>Bottom-left card</text-ui>
77
+ </section>
78
+ </card-ui>
79
+ <card-ui id="demo-tour-br">
80
+ <section>
81
+ <text-ui strong>Bottom-right card</text-ui>
82
+ </section>
83
+ </card-ui>
84
+ </grid-ui>
85
+ <tour-ui id="tour-place">
86
+ <tour-step-ui target="#demo-tour-tl" title="Top-left" placement="right">Popover anchors to the right side.</tour-step-ui>
87
+ <tour-step-ui target="#demo-tour-tr" title="Top-right" placement="left">Popover anchors to the left side.</tour-step-ui>
88
+ <tour-step-ui target="#demo-tour-bl" title="Bottom-left" placement="top">Popover anchors above the target.</tour-step-ui>
89
+ <tour-step-ui target="#demo-tour-br" title="Bottom-right" placement="top">Popover anchors above the target.</tour-step-ui>
90
+ </tour-ui>
91
+ </col-ui>
92
+ ```
93
+
94
+ ## Show once per user — [storage-key]
95
+
96
+ ```html
97
+ <col-ui gap="3">
98
+ <row-ui gap="2">
99
+ <button-ui id="tour-storage-start" text="Start tour" variant="primary"></button-ui>
100
+ <button-ui id="tour-storage-reset" text="Reset storage" variant="ghost"></button-ui>
101
+ </row-ui>
102
+ <card-ui id="demo-tour-storage-card">
103
+ <section>
104
+ <text-ui>
105
+ This card is the target. Each visit, the tour fires once per user — completion is recorded under
106
+ <code>demo:tour:v1</code>
107
+ .
108
+ </text-ui>
109
+ </section>
110
+ </card-ui>
111
+ <tour-ui id="tour-storage" storage-key="demo:tour:v1">
112
+ <tour-step-ui target="#demo-tour-storage-card" title="Once per user" placement="top">
113
+ This tour records completion to localStorage under
114
+ <code>demo:tour:v1</code>
115
+ and won't auto-start again. Reset storage above to test.
116
+ </tour-step-ui>
117
+ </tour-ui>
118
+ </col-ui>
119
+ ```
@@ -0,0 +1,26 @@
1
+ # visually-hidden — Examples
2
+
3
+ ## Icon-button label
4
+
5
+ ```html
6
+ <row-ui gap="2">
7
+ <button-ui icon="pencil-simple" variant="ghost">
8
+ <visually-hidden-ui>Edit profile</visually-hidden-ui>
9
+ </button-ui>
10
+ <button-ui icon="trash" variant="ghost" color="danger">
11
+ <visually-hidden-ui>Delete profile</visually-hidden-ui>
12
+ </button-ui>
13
+ <button-ui icon="share" variant="ghost">
14
+ <visually-hidden-ui>Share profile</visually-hidden-ui>
15
+ </button-ui>
16
+ </row-ui>
17
+ ```
18
+
19
+ ## Live-region status announcement
20
+
21
+ ```html
22
+ <div role="status" aria-live="polite">
23
+ <visually-hidden-ui>Document saved 2 minutes ago.</visually-hidden-ui>
24
+ </div>
25
+ <text-ui color="subtle" size="sm">(Inspect element — the announcement is in the DOM but invisible.)</text-ui>
26
+ ```