@agent-ui-kit/web-components 0.0.3 → 0.0.5
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/README.md +429 -0
- package/dist/agent-ui.css +1 -1
- package/dist/api.json +9519 -0
- package/dist/docs/blocks/agent-chat.yaml +111 -0
- package/dist/docs/blocks/announcement-card.yaml +30 -0
- package/dist/docs/blocks/bpm-process.yaml +7 -0
- package/dist/docs/blocks/chart-activity.yaml +73 -0
- package/dist/docs/blocks/chart-card.yaml +55 -0
- package/dist/docs/blocks/chart-donut.yaml +83 -0
- package/dist/docs/blocks/chart-grouped.yaml +75 -0
- package/dist/docs/blocks/chart-horizontal.yaml +59 -0
- package/dist/docs/blocks/chart-interactive.yaml +58 -0
- package/dist/docs/blocks/chart-labeled.yaml +66 -0
- package/dist/docs/blocks/checkout-form.yaml +57 -0
- package/dist/docs/blocks/clinical-trial.yaml +7 -0
- package/dist/docs/blocks/contributors.yaml +51 -0
- package/dist/docs/blocks/cyber-threat.yaml +7 -0
- package/dist/docs/blocks/dashboard-layout.yaml +121 -0
- package/dist/docs/blocks/data-eng-dag.yaml +9 -0
- package/dist/docs/blocks/date-picker.yaml +30 -0
- package/dist/docs/blocks/ddx-workflow.yaml +9 -0
- package/dist/docs/blocks/empty-state.yaml +26 -0
- package/dist/docs/blocks/env-variables.yaml +46 -0
- package/dist/docs/blocks/feature-upgrade.yaml +52 -0
- package/dist/docs/blocks/financial-risk.yaml +7 -0
- package/dist/docs/blocks/flow-editor.yaml +113 -0
- package/dist/docs/blocks/gen-ai-pipeline.yaml +8 -0
- package/dist/docs/blocks/index.yaml +245 -0
- package/dist/docs/blocks/issue-assign.yaml +34 -0
- package/dist/docs/blocks/keyboard-shortcuts.yaml +49 -0
- package/dist/docs/blocks/login-branded.yaml +81 -0
- package/dist/docs/blocks/login-email-only.yaml +39 -0
- package/dist/docs/blocks/login-form.yaml +42 -0
- package/dist/docs/blocks/login-simple.yaml +54 -0
- package/dist/docs/blocks/login-social.yaml +73 -0
- package/dist/docs/blocks/login-two-column.yaml +78 -0
- package/dist/docs/blocks/marketing-automation.yaml +7 -0
- package/dist/docs/blocks/member-list.yaml +58 -0
- package/dist/docs/blocks/ml-pipeline.yaml +7 -0
- package/dist/docs/blocks/nav-card.yaml +27 -0
- package/dist/docs/blocks/notification-list.yaml +58 -0
- package/dist/docs/blocks/oncology-pathway.yaml +7 -0
- package/dist/docs/blocks/pricing-card.yaml +53 -0
- package/dist/docs/blocks/processing-state.yaml +25 -0
- package/dist/docs/blocks/profile-card.yaml +48 -0
- package/dist/docs/blocks/saas-onboarding.yaml +7 -0
- package/dist/docs/blocks/settings-form.yaml +42 -0
- package/dist/docs/blocks/settings-panel.yaml +54 -0
- package/dist/docs/blocks/sidebar-nav.yaml +55 -0
- package/dist/docs/blocks/signup-form.yaml +47 -0
- package/dist/docs/blocks/stat-cards.yaml +49 -0
- package/dist/docs/blocks/status-card.yaml +40 -0
- package/dist/docs/blocks/suggested-labs.yaml +79 -0
- package/dist/docs/blocks/supply-chain.yaml +7 -0
- package/dist/docs/blocks/survey-card.yaml +52 -0
- package/dist/docs/blocks/tabbed-panel.yaml +53 -0
- package/dist/docs/blocks/team-empty.yaml +27 -0
- package/dist/docs/blocks/usage-billing.yaml +99 -0
- package/dist/docs/components/accordion-item.yaml +52 -0
- package/dist/docs/components/accordion.yaml +69 -0
- package/dist/docs/components/agent-activity.yaml +79 -0
- package/dist/docs/components/agent-feed.yaml +83 -0
- package/dist/docs/components/agent-message.yaml +120 -0
- package/dist/docs/components/agent-panel.yaml +91 -0
- package/dist/docs/components/agent-prompt.yaml +78 -0
- package/dist/docs/components/agent-seeds.yaml +44 -0
- package/dist/docs/components/agent-text.yaml +57 -0
- package/dist/docs/components/agent-thread.yaml +82 -0
- package/dist/docs/components/app-shell.yaml +64 -0
- package/dist/docs/components/breadcrumb-item.yaml +49 -0
- package/dist/docs/components/breadcrumb.yaml +59 -0
- package/dist/docs/components/button.yaml +439 -0
- package/dist/docs/components/calendar.yaml +74 -0
- package/dist/docs/components/canvas.yaml +161 -0
- package/dist/docs/components/checkbox.yaml +141 -0
- package/dist/docs/components/command-empty.yaml +13 -0
- package/dist/docs/components/command-group.yaml +23 -0
- package/dist/docs/components/command-input.yaml +19 -0
- package/dist/docs/components/command-item.yaml +37 -0
- package/dist/docs/components/command-list.yaml +17 -0
- package/dist/docs/components/command.yaml +64 -0
- package/dist/docs/components/container.yaml +298 -0
- package/dist/docs/components/dialog.yaml +133 -0
- package/dist/docs/components/drawer.yaml +124 -0
- package/dist/docs/components/editor-layer.yaml +59 -0
- package/dist/docs/components/editor.yaml +168 -0
- package/dist/docs/components/feed.yaml +72 -0
- package/dist/docs/components/field.yaml +145 -0
- package/dist/docs/components/graph-layer.yaml +41 -0
- package/dist/docs/components/graph-node.yaml +58 -0
- package/dist/docs/components/graph-noodle.yaml +103 -0
- package/dist/docs/components/graph-port.yaml +71 -0
- package/dist/docs/components/graph-ui.yaml +64 -0
- package/dist/docs/components/gripper.yaml +55 -0
- package/dist/docs/components/icon.yaml +133 -0
- package/dist/docs/components/index.yaml +320 -0
- package/dist/docs/components/input-otp.yaml +59 -0
- package/dist/docs/components/input.yaml +289 -0
- package/dist/docs/components/noodles.yaml +184 -0
- package/dist/docs/components/optgroup.yaml +38 -0
- package/dist/docs/components/option.yaml +56 -0
- package/dist/docs/components/page-context.yaml +55 -0
- package/dist/docs/components/page-main.yaml +39 -0
- package/dist/docs/components/page.yaml +36 -0
- package/dist/docs/components/pagination.yaml +46 -0
- package/dist/docs/components/pane.yaml +102 -0
- package/dist/docs/components/panes.yaml +82 -0
- package/dist/docs/components/preview-app.yaml +170 -0
- package/dist/docs/components/radio-group.yaml +108 -0
- package/dist/docs/components/radio.yaml +132 -0
- package/dist/docs/components/range.yaml +97 -0
- package/dist/docs/components/root.yaml +18 -0
- package/dist/docs/components/segment.yaml +41 -0
- package/dist/docs/components/segmented-control.yaml +52 -0
- package/dist/docs/components/select.yaml +241 -0
- package/dist/docs/components/sidebar-content.yaml +32 -0
- package/dist/docs/components/sidebar-footer.yaml +28 -0
- package/dist/docs/components/sidebar-header.yaml +28 -0
- package/dist/docs/components/sidebar.yaml +133 -0
- package/dist/docs/components/switch.yaml +131 -0
- package/dist/docs/components/tab-panel.yaml +41 -0
- package/dist/docs/components/tab.yaml +51 -0
- package/dist/docs/components/table-body.yaml +11 -0
- package/dist/docs/components/table-cell.yaml +11 -0
- package/dist/docs/components/table-column.yaml +76 -0
- package/dist/docs/components/table-head.yaml +11 -0
- package/dist/docs/components/table-header.yaml +11 -0
- package/dist/docs/components/table-row.yaml +11 -0
- package/dist/docs/components/table.yaml +219 -0
- package/dist/docs/components/tabs.yaml +61 -0
- package/dist/docs/components/textarea.yaml +196 -0
- package/dist/docs/components/toast.yaml +62 -0
- package/dist/docs/components/tooltip.yaml +98 -0
- package/dist/docs/components/tree-item.yaml +46 -0
- package/dist/docs/components/tree.yaml +27 -0
- package/dist/docs/traits/auto-dismiss.yaml +23 -0
- package/dist/docs/traits/backtick-wrap.yaml +22 -0
- package/dist/docs/traits/clipboard.yaml +31 -0
- package/dist/docs/traits/collapsible.yaml +23 -0
- package/dist/docs/traits/confetti.yaml +37 -0
- package/dist/docs/traits/copy.yaml +27 -0
- package/dist/docs/traits/css-inspect.yaml +46 -0
- package/dist/docs/traits/dismiss.yaml +23 -0
- package/dist/docs/traits/drag.yaml +88 -0
- package/dist/docs/traits/drop-zone.yaml +37 -0
- package/dist/docs/traits/edit.yaml +39 -0
- package/dist/docs/traits/flip.yaml +40 -0
- package/dist/docs/traits/gateway.yaml +33 -0
- package/dist/docs/traits/hover.yaml +39 -0
- package/dist/docs/traits/intersect.yaml +42 -0
- package/dist/docs/traits/link-paste.yaml +28 -0
- package/dist/docs/traits/linked-scroll.yaml +37 -0
- package/dist/docs/traits/list-navigate.yaml +46 -0
- package/dist/docs/traits/magnet.yaml +33 -0
- package/dist/docs/traits/mention.yaml +40 -0
- package/dist/docs/traits/modal.yaml +28 -0
- package/dist/docs/traits/noodle.yaml +45 -0
- package/dist/docs/traits/overlay.yaml +58 -0
- package/dist/docs/traits/pan-zoom.yaml +47 -0
- package/dist/docs/traits/parallax.yaml +36 -0
- package/dist/docs/traits/persist.yaml +42 -0
- package/dist/docs/traits/popover.yaml +28 -0
- package/dist/docs/traits/present.yaml +42 -0
- package/dist/docs/traits/press-hold.yaml +34 -0
- package/dist/docs/traits/range-select.yaml +42 -0
- package/dist/docs/traits/resize.yaml +39 -0
- package/dist/docs/traits/ripple.yaml +20 -0
- package/dist/docs/traits/roving-focus.yaml +30 -0
- package/dist/docs/traits/search.yaml +44 -0
- package/dist/docs/traits/selection.yaml +41 -0
- package/dist/docs/traits/shortcut.yaml +25 -0
- package/dist/docs/traits/slash-command.yaml +40 -0
- package/dist/docs/traits/snap-resize.yaml +39 -0
- package/dist/docs/traits/sort.yaml +47 -0
- package/dist/docs/traits/store.yaml +32 -0
- package/dist/docs/traits/swipe.yaml +38 -0
- package/dist/docs/traits/text-trigger.yaml +35 -0
- package/dist/docs/traits/toast.yaml +41 -0
- package/dist/docs/traits/toggle-scheme.yaml +40 -0
- package/dist/docs/traits/toggle-state.yaml +23 -0
- package/dist/docs/traits/tooltip.yaml +39 -0
- package/dist/docs/traits/toss.yaml +40 -0
- package/dist/docs/traits/trap-focus.yaml +20 -0
- package/dist/docs/traits/validate.yaml +52 -0
- package/dist/docs/traits/virtual-scroll.yaml +44 -0
- package/package.json +4 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: aui-tooltip
|
|
2
|
+
tag: aui-tooltip
|
|
3
|
+
type: component
|
|
4
|
+
summary: Hover/focus tooltip with popover-based positioning.
|
|
5
|
+
description: >
|
|
6
|
+
A lightweight tooltip that appears on hover or focus of its anchor
|
|
7
|
+
element. Uses the Popover API for top-layer rendering and CSS
|
|
8
|
+
anchor positioning for placement. The anchor is auto-discovered
|
|
9
|
+
as the previous sibling element.
|
|
10
|
+
|
|
11
|
+
base: AgentElement
|
|
12
|
+
|
|
13
|
+
# ── Component attributes ──────────────────────────────────
|
|
14
|
+
|
|
15
|
+
attributes:
|
|
16
|
+
content:
|
|
17
|
+
syntax: key-value
|
|
18
|
+
type: string
|
|
19
|
+
default: ""
|
|
20
|
+
description: >
|
|
21
|
+
The text content displayed inside the tooltip.
|
|
22
|
+
|
|
23
|
+
position:
|
|
24
|
+
syntax: key-value
|
|
25
|
+
type: enum
|
|
26
|
+
values: [top, bottom, left, right]
|
|
27
|
+
default: top
|
|
28
|
+
description: >
|
|
29
|
+
Preferred placement relative to the anchor element.
|
|
30
|
+
Uses CSS anchor positioning for layout.
|
|
31
|
+
|
|
32
|
+
# ── Content model ─────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
content:
|
|
35
|
+
model: empty
|
|
36
|
+
accepts: []
|
|
37
|
+
required: false
|
|
38
|
+
description: >
|
|
39
|
+
Content is set via the content attribute. The tooltip
|
|
40
|
+
stamps its own popover surface internally.
|
|
41
|
+
|
|
42
|
+
# ── Composition ───────────────────────────────────────────
|
|
43
|
+
|
|
44
|
+
composition:
|
|
45
|
+
parents: [any]
|
|
46
|
+
children: null
|
|
47
|
+
context: >
|
|
48
|
+
Place as a sibling immediately after the element you want
|
|
49
|
+
to annotate. The tooltip auto-discovers the previous sibling
|
|
50
|
+
as its anchor. Works with any interactive element.
|
|
51
|
+
|
|
52
|
+
# ── Accessibility ─────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
a11y:
|
|
55
|
+
role: tooltip (on the popover surface)
|
|
56
|
+
aria:
|
|
57
|
+
aria-describedby: Set on the anchor element, pointing to the tooltip.
|
|
58
|
+
keyboard:
|
|
59
|
+
Escape: Dismisses the tooltip.
|
|
60
|
+
focus:
|
|
61
|
+
description: >
|
|
62
|
+
Tooltip appears on focusin and disappears on focusout
|
|
63
|
+
of the anchor element.
|
|
64
|
+
|
|
65
|
+
# ── CSS tokens consumed ──────────────────────────────────
|
|
66
|
+
|
|
67
|
+
tokens:
|
|
68
|
+
color:
|
|
69
|
+
- --aui-tooltip-ink
|
|
70
|
+
- --aui-tooltip-fill
|
|
71
|
+
shape:
|
|
72
|
+
- --aui-radius
|
|
73
|
+
motion:
|
|
74
|
+
- --aui-easing
|
|
75
|
+
typography:
|
|
76
|
+
- --aui-font-family
|
|
77
|
+
shadow:
|
|
78
|
+
- --aui-shadow-sm
|
|
79
|
+
|
|
80
|
+
# ── Examples ──────────────────────────────────────────────
|
|
81
|
+
|
|
82
|
+
examples:
|
|
83
|
+
- html: |
|
|
84
|
+
<aui-button hide-label ghost label="Settings">
|
|
85
|
+
<aui-icon name="gear" slot="leading"></aui-icon>
|
|
86
|
+
</aui-button>
|
|
87
|
+
<aui-tooltip content="Settings" position="bottom"></aui-tooltip>
|
|
88
|
+
description: Tooltip on an hide-label button.
|
|
89
|
+
|
|
90
|
+
- html: |
|
|
91
|
+
<aui-button primary accent>Save</aui-button>
|
|
92
|
+
<aui-tooltip content="Save your changes (⌘S)"></aui-tooltip>
|
|
93
|
+
description: Tooltip with keyboard shortcut hint.
|
|
94
|
+
|
|
95
|
+
- html: |
|
|
96
|
+
<aui-icon name="info" label="Info"></aui-icon>
|
|
97
|
+
<aui-tooltip content="More information" position="right"></aui-tooltip>
|
|
98
|
+
description: Tooltip positioned to the right of an icon.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: aui-tree-item
|
|
2
|
+
tag: aui-tree-item
|
|
3
|
+
type: component
|
|
4
|
+
summary: Tree node with expand/collapse and nesting
|
|
5
|
+
base: AgentElement
|
|
6
|
+
attributes:
|
|
7
|
+
expanded:
|
|
8
|
+
syntax: boolean
|
|
9
|
+
type: boolean
|
|
10
|
+
default: false
|
|
11
|
+
description: Whether children are visible.
|
|
12
|
+
selected:
|
|
13
|
+
syntax: boolean
|
|
14
|
+
type: boolean
|
|
15
|
+
default: false
|
|
16
|
+
description: Whether this item is selected.
|
|
17
|
+
disabled:
|
|
18
|
+
syntax: boolean
|
|
19
|
+
type: boolean
|
|
20
|
+
default: false
|
|
21
|
+
description: Prevents interaction.
|
|
22
|
+
a11y:
|
|
23
|
+
role: treeitem
|
|
24
|
+
keyboard:
|
|
25
|
+
Enter: Select/toggle item.
|
|
26
|
+
ArrowRight: Expand (if collapsed).
|
|
27
|
+
ArrowLeft: Collapse (if expanded).
|
|
28
|
+
composition:
|
|
29
|
+
parents: [aui-tree, aui-tree-item]
|
|
30
|
+
children: [aui-tree-item]
|
|
31
|
+
description: >
|
|
32
|
+
A tree node that supports expand/collapse and arbitrary nesting.
|
|
33
|
+
The caret indicator uses aui-icon name="caret-right" (rotated when
|
|
34
|
+
expanded) and is automatically stamped by the component.
|
|
35
|
+
|
|
36
|
+
examples:
|
|
37
|
+
- html: |
|
|
38
|
+
<aui-tree>
|
|
39
|
+
<aui-tree-item expanded>
|
|
40
|
+
<span data-trigger>Parent node</span>
|
|
41
|
+
<aui-tree-item><span data-trigger>Child A</span></aui-tree-item>
|
|
42
|
+
<aui-tree-item selected><span data-trigger>Child B (selected)</span></aui-tree-item>
|
|
43
|
+
<aui-tree-item disabled><span data-trigger>Child C (disabled)</span></aui-tree-item>
|
|
44
|
+
</aui-tree-item>
|
|
45
|
+
</aui-tree>
|
|
46
|
+
description: Tree with expanded parent and child items showing selected and disabled states.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: aui-tree
|
|
2
|
+
tag: aui-tree
|
|
3
|
+
type: component
|
|
4
|
+
summary: Hierarchical tree view with expand/collapse
|
|
5
|
+
base: AgentElement
|
|
6
|
+
a11y:
|
|
7
|
+
role: tree
|
|
8
|
+
keyboard:
|
|
9
|
+
ArrowDown: Focus next visible item.
|
|
10
|
+
ArrowUp: Focus previous visible item.
|
|
11
|
+
composition:
|
|
12
|
+
parents: [any]
|
|
13
|
+
children: [aui-tree-item]
|
|
14
|
+
examples:
|
|
15
|
+
- html: |
|
|
16
|
+
<aui-tree>
|
|
17
|
+
<aui-tree-item expanded>
|
|
18
|
+
<span data-trigger>Documents</span>
|
|
19
|
+
<aui-tree-item><span data-trigger>report.pdf</span></aui-tree-item>
|
|
20
|
+
<aui-tree-item><span data-trigger>notes.txt</span></aui-tree-item>
|
|
21
|
+
</aui-tree-item>
|
|
22
|
+
<aui-tree-item>
|
|
23
|
+
<span data-trigger>Images</span>
|
|
24
|
+
<aui-tree-item><span data-trigger>photo.jpg</span></aui-tree-item>
|
|
25
|
+
</aui-tree-item>
|
|
26
|
+
</aui-tree>
|
|
27
|
+
description: File tree with nested folders.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: auto-dismiss
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Automatically hides the host after a configurable timeout.
|
|
5
|
+
description: >
|
|
6
|
+
Sets a countdown timer that hides the host element after the specified
|
|
7
|
+
delay. Exposes the remaining time as a data attribute updated each second.
|
|
8
|
+
Pauses the timer on pointer hover. Useful for toasts, notifications,
|
|
9
|
+
and transient alerts.
|
|
10
|
+
config:
|
|
11
|
+
- delay: Time in milliseconds before auto-dismiss (default '3000')
|
|
12
|
+
events:
|
|
13
|
+
- dismiss: Fires when the element is auto-dismissed
|
|
14
|
+
exposes:
|
|
15
|
+
- data-auto-dismiss-remaining: Countdown in milliseconds, updated each second
|
|
16
|
+
- data-auto-dismiss-dismissed: Present after the element has been dismissed
|
|
17
|
+
examples:
|
|
18
|
+
- html: |
|
|
19
|
+
<aui-badge traits="auto-dismiss">Notification</aui-badge>
|
|
20
|
+
description: Basic auto-dismiss after 3 seconds.
|
|
21
|
+
- html: |
|
|
22
|
+
<aui-badge traits="{ trait: 'auto-dismiss', delay: '5000' }">Slower toast</aui-badge>
|
|
23
|
+
description: Auto-dismiss after 5 seconds.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: backtick-wrap
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Auto-wraps selected text in backticks on backtick keypress.
|
|
5
|
+
description: >
|
|
6
|
+
Listens for the backtick key on the host element. When text is selected,
|
|
7
|
+
wraps it in single backticks for inline selections or triple backticks
|
|
8
|
+
for multi-line selections. Works with both contenteditable and native
|
|
9
|
+
input/textarea elements.
|
|
10
|
+
|
|
11
|
+
config: []
|
|
12
|
+
|
|
13
|
+
events:
|
|
14
|
+
- name: backtick-wrap
|
|
15
|
+
description: Fires after wrapping, with detail containing the original text and wrapped result.
|
|
16
|
+
|
|
17
|
+
exposes: []
|
|
18
|
+
|
|
19
|
+
examples:
|
|
20
|
+
- html: |
|
|
21
|
+
<aui-editor traits="backtick-wrap">Select text and press backtick</aui-editor>
|
|
22
|
+
description: Basic usage on an editor element.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: clipboard
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Handles paste events, parsing clipboard data into structured components.
|
|
5
|
+
description: >
|
|
6
|
+
Listens for paste events on the host and extracts text, HTML, and file
|
|
7
|
+
data from the clipboard. Filters content by configurable MIME type
|
|
8
|
+
accept patterns (supports wildcards like image/*). Emits a paste event
|
|
9
|
+
with the structured data and exposes a has-data state after paste.
|
|
10
|
+
config:
|
|
11
|
+
- name: accept
|
|
12
|
+
type: string
|
|
13
|
+
default: "text/plain,text/html,image/*"
|
|
14
|
+
description: Comma-separated MIME types to accept.
|
|
15
|
+
- name: prevent
|
|
16
|
+
type: string
|
|
17
|
+
default: "true"
|
|
18
|
+
description: Prevent default paste behavior ('true' | 'false').
|
|
19
|
+
events:
|
|
20
|
+
- name: paste
|
|
21
|
+
description: Fires on paste, detail contains text, html, files, and types.
|
|
22
|
+
exposes:
|
|
23
|
+
- name: data-clipboard-has-data
|
|
24
|
+
description: Present after a paste event has been processed.
|
|
25
|
+
examples:
|
|
26
|
+
- html: |
|
|
27
|
+
<aui-editor traits="clipboard">Paste here</aui-editor>
|
|
28
|
+
description: Basic clipboard paste handler.
|
|
29
|
+
- html: |
|
|
30
|
+
<aui-editor traits="{ trait: 'clipboard', accept: 'text/plain' }">Plain text only</aui-editor>
|
|
31
|
+
description: Only accepts plain text pastes.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: collapsible
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Toggles host height between collapsed and expanded states with CSS transitions.
|
|
5
|
+
description: >
|
|
6
|
+
Animates the host element between a collapsed (max-height: 0) and expanded state
|
|
7
|
+
using CSS transitions on max-height. Responds to press events to toggle, and
|
|
8
|
+
exposes the collapsed boolean as a data attribute. Configurable initial state
|
|
9
|
+
and transition duration.
|
|
10
|
+
config:
|
|
11
|
+
- collapsed: Initial collapsed state ('true' | 'false', default 'false')
|
|
12
|
+
- duration: Transition duration in milliseconds (default '200')
|
|
13
|
+
events:
|
|
14
|
+
- press: Triggers toggle between collapsed and expanded
|
|
15
|
+
exposes:
|
|
16
|
+
- data-collapsible-collapsed: Boolean indicating whether the element is collapsed
|
|
17
|
+
examples:
|
|
18
|
+
- html: |
|
|
19
|
+
<aui-panel traits="collapsible">Content here</aui-panel>
|
|
20
|
+
description: Basic collapsible panel, starts expanded.
|
|
21
|
+
- html: |
|
|
22
|
+
<aui-panel traits="{ trait: 'collapsible', collapsed: 'true', duration: '300' }">Content here</aui-panel>
|
|
23
|
+
description: Starts collapsed with a 300ms transition.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: confetti
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Bursts confetti particles from the host on press.
|
|
5
|
+
description: >
|
|
6
|
+
Spawns colorful confetti particles that fly outward from the center
|
|
7
|
+
of the host element when a press event fires. Uses CSS animations
|
|
8
|
+
for particle movement and rotation with no JS animation frames.
|
|
9
|
+
Particles auto-remove on animationend.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: count
|
|
13
|
+
type: string
|
|
14
|
+
default: "30"
|
|
15
|
+
description: Number of confetti particles to spawn per burst.
|
|
16
|
+
- name: spread
|
|
17
|
+
type: string
|
|
18
|
+
default: "60"
|
|
19
|
+
description: Angular spread in degrees for the particle cone.
|
|
20
|
+
- name: duration
|
|
21
|
+
type: string
|
|
22
|
+
default: "800"
|
|
23
|
+
description: Animation duration in milliseconds for each particle.
|
|
24
|
+
|
|
25
|
+
events: []
|
|
26
|
+
|
|
27
|
+
exposes: []
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- html: |
|
|
31
|
+
<aui-button traits="confetti">Celebrate</aui-button>
|
|
32
|
+
description: Basic confetti burst on press.
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-button traits="{ trait: 'confetti', count: '50', spread: '90' }">
|
|
35
|
+
Big celebration
|
|
36
|
+
</aui-button>
|
|
37
|
+
description: Dense confetti with wider spread.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: copy
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Copies text to clipboard on press with visual feedback.
|
|
5
|
+
description: >
|
|
6
|
+
On press, copies the configured text (or the host's textContent) to
|
|
7
|
+
the clipboard using the Clipboard API. Shows a brief feedback state
|
|
8
|
+
then restores after a duration.
|
|
9
|
+
config:
|
|
10
|
+
- name: text
|
|
11
|
+
type: string
|
|
12
|
+
default: ""
|
|
13
|
+
description: Text to copy (default uses host's textContent).
|
|
14
|
+
- name: feedback
|
|
15
|
+
type: string
|
|
16
|
+
default: "1500"
|
|
17
|
+
description: Duration of feedback window in milliseconds.
|
|
18
|
+
events:
|
|
19
|
+
- name: copy-success
|
|
20
|
+
description: Fires after successful copy with { text } detail.
|
|
21
|
+
exposes:
|
|
22
|
+
- name: data-copy-copied
|
|
23
|
+
description: Present during the feedback window after a copy.
|
|
24
|
+
examples:
|
|
25
|
+
- html: |
|
|
26
|
+
<aui-button traits="copy">Copy this text</aui-button>
|
|
27
|
+
description: Basic copy button using textContent.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: css-inspect
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: 3D exploded view of the DOM tree for visual debugging.
|
|
5
|
+
description: >
|
|
6
|
+
Toggles on press to create a 3D exploded view of the host's DOM tree.
|
|
7
|
+
Each level of children is pushed along the Z axis with perspective
|
|
8
|
+
transforms. Configurable depth, spread distance, and tilt angles.
|
|
9
|
+
Visual styles like outlines and transitions are handled via CSS.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: depth
|
|
13
|
+
type: string
|
|
14
|
+
default: "3"
|
|
15
|
+
description: Maximum depth of children to transform.
|
|
16
|
+
- name: spread
|
|
17
|
+
type: string
|
|
18
|
+
default: "40"
|
|
19
|
+
description: Pixels between each depth level along the Z axis.
|
|
20
|
+
- name: tilt-x
|
|
21
|
+
type: string
|
|
22
|
+
default: "15"
|
|
23
|
+
description: Degrees of X-axis rotation when active.
|
|
24
|
+
- name: tilt-y
|
|
25
|
+
type: string
|
|
26
|
+
default: "30"
|
|
27
|
+
description: Degrees of Y-axis rotation when active.
|
|
28
|
+
|
|
29
|
+
events: []
|
|
30
|
+
|
|
31
|
+
exposes:
|
|
32
|
+
- name: data-css-inspect-active
|
|
33
|
+
description: Present and set to "true" while the inspect view is active.
|
|
34
|
+
|
|
35
|
+
examples:
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-panel traits="css-inspect">
|
|
38
|
+
<div>Child 1</div>
|
|
39
|
+
<div>Child 2</div>
|
|
40
|
+
</aui-panel>
|
|
41
|
+
description: Basic usage toggled via press event.
|
|
42
|
+
- html: |
|
|
43
|
+
<aui-panel traits="{ trait: 'css-inspect', depth: '5', spread: '60' }">
|
|
44
|
+
<div>Deep inspect</div>
|
|
45
|
+
</aui-panel>
|
|
46
|
+
description: Custom depth and spread configuration.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: dismiss
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Closes the host on Escape key or outside click.
|
|
5
|
+
description: >
|
|
6
|
+
Listens for Escape keydown and pointer events outside the host element,
|
|
7
|
+
emitting a configurable dismiss event when triggered. Both triggers can
|
|
8
|
+
be independently enabled or disabled. Useful for popover, dropdown, and
|
|
9
|
+
overlay dismiss patterns.
|
|
10
|
+
config:
|
|
11
|
+
- escape: Enable Escape key dismiss ('true' | 'false', default 'true')
|
|
12
|
+
- outside: Enable outside click dismiss ('true' | 'false', default 'true')
|
|
13
|
+
- event: Custom event name to emit on dismiss (default 'dismiss')
|
|
14
|
+
events:
|
|
15
|
+
- dismiss: Fires when dismiss is triggered (configurable name)
|
|
16
|
+
exposes: []
|
|
17
|
+
examples:
|
|
18
|
+
- html: |
|
|
19
|
+
<aui-popover traits="dismiss">Dismissible content</aui-popover>
|
|
20
|
+
description: Basic usage with both Escape and outside click.
|
|
21
|
+
- html: |
|
|
22
|
+
<aui-popover traits="{ trait: 'dismiss', outside: 'false' }">Escape only</aui-popover>
|
|
23
|
+
description: Dismiss only on Escape key.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
name: drag
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Composable pointer-driven drag-and-drop with drop, slot, and preview modes.
|
|
5
|
+
description: >
|
|
6
|
+
Three modes: drop (outlines the target element), slot (shows a gap indicator
|
|
7
|
+
between items for insertion), and preview (live DOM reordering). Set zoneSelector
|
|
8
|
+
to enable cross-zone dragging (e.g., kanban boards). Ghost renders in the top
|
|
9
|
+
layer via popover. Press Escape to cancel.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: selector
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
description: CSS selector for draggable items within the host. Required.
|
|
16
|
+
- name: drop-zone-selector
|
|
17
|
+
type: string
|
|
18
|
+
default: ""
|
|
19
|
+
description: CSS selector for drop zones. Defaults to selector items if empty.
|
|
20
|
+
- name: zone-selector
|
|
21
|
+
type: string
|
|
22
|
+
default: ""
|
|
23
|
+
description: CSS selector for zone containers (e.g., kanban columns). Enables cross-zone dragging.
|
|
24
|
+
- name: axis
|
|
25
|
+
type: string
|
|
26
|
+
default: "both"
|
|
27
|
+
description: Constrains hit-testing to 'vertical', 'horizontal', or 'both'. Ghost always moves freely.
|
|
28
|
+
- name: mode
|
|
29
|
+
type: string
|
|
30
|
+
default: "drop"
|
|
31
|
+
description: >
|
|
32
|
+
'drop' outlines hovered target. 'slot' shows gap indicator.
|
|
33
|
+
'preview' moves the real item in real time (no consumer reordering needed).
|
|
34
|
+
- name: animate
|
|
35
|
+
type: string
|
|
36
|
+
default: "true"
|
|
37
|
+
description: Enable view-transition animation for preview mode grid reordering.
|
|
38
|
+
|
|
39
|
+
events:
|
|
40
|
+
- name: drag-start
|
|
41
|
+
description: Fired on first pointer move. Detail { item, index }.
|
|
42
|
+
- name: drag-move
|
|
43
|
+
description: Fired on every pointer move during drag. Detail { item, x, y }.
|
|
44
|
+
- name: drag-over
|
|
45
|
+
description: Fired when the target or insertion position changes.
|
|
46
|
+
- name: drop
|
|
47
|
+
description: Fired on pointer up. Detail includes item, fromIndex, toIndex, insertBefore (slot), target (drop), sourceZone, targetZone.
|
|
48
|
+
- name: drag-cancel
|
|
49
|
+
description: Fired when Escape is pressed or pointer is cancelled. Detail { item }.
|
|
50
|
+
|
|
51
|
+
exposes:
|
|
52
|
+
- name: "[dragging]"
|
|
53
|
+
description: Present on the dragged item while dragging.
|
|
54
|
+
- name: "[drag-over]"
|
|
55
|
+
description: Present on drop target (drop mode).
|
|
56
|
+
- name: "[drag-slot-before]"
|
|
57
|
+
description: Item immediately after insertion gap (slot mode).
|
|
58
|
+
- name: "[drag-slot-after]"
|
|
59
|
+
description: Item immediately before insertion gap (slot mode).
|
|
60
|
+
- name: "[drag-zone-active]"
|
|
61
|
+
description: Zone the ghost is currently over (cross-zone mode).
|
|
62
|
+
|
|
63
|
+
examples:
|
|
64
|
+
- html: |
|
|
65
|
+
<div traits="{ trait: 'drag', selector: '.drag-item', axis: 'vertical', mode: 'drop' }">
|
|
66
|
+
<div class="drag-item">Design mockups</div>
|
|
67
|
+
<div class="drag-item">Write component API</div>
|
|
68
|
+
<div class="drag-item">Implement CSS</div>
|
|
69
|
+
</div>
|
|
70
|
+
description: Drop mode — outlines hovered target for swap.
|
|
71
|
+
- html: |
|
|
72
|
+
<div traits="{ trait: 'drag', selector: '.drag-item', axis: 'vertical', mode: 'slot' }">
|
|
73
|
+
<div class="drag-item">Research</div>
|
|
74
|
+
<div class="drag-item">Prototype</div>
|
|
75
|
+
<div class="drag-item">Build</div>
|
|
76
|
+
<div class="drag-item">Test</div>
|
|
77
|
+
<div class="drag-item">Ship</div>
|
|
78
|
+
</div>
|
|
79
|
+
description: Slot mode — shows gap indicator between items.
|
|
80
|
+
- html: |
|
|
81
|
+
<div traits="{ trait: 'drag', selector: '.grid-cell', axis: 'both', mode: 'preview' }">
|
|
82
|
+
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;">
|
|
83
|
+
<div class="grid-cell">1</div>
|
|
84
|
+
<div class="grid-cell">2</div>
|
|
85
|
+
<div class="grid-cell">3</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
description: Preview mode — live DOM reordering with view transitions.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: drop-zone
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Makes the host a drag-and-drop target for files and data.
|
|
5
|
+
description: >
|
|
6
|
+
Handles dragover, dragenter, dragleave, and drop events on the host
|
|
7
|
+
element. Validates dropped content against configurable accepted MIME
|
|
8
|
+
type patterns. Exposes an over state while dragging over the host and
|
|
9
|
+
emits a drop event with files, items, and text on successful drop.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: accept
|
|
13
|
+
type: string
|
|
14
|
+
default: "*"
|
|
15
|
+
description: Comma-separated MIME type patterns to accept (e.g., "image/*,text/plain").
|
|
16
|
+
- name: overlay
|
|
17
|
+
type: string
|
|
18
|
+
default: "true"
|
|
19
|
+
description: Whether to show a visual overlay during drag-over.
|
|
20
|
+
|
|
21
|
+
events:
|
|
22
|
+
- name: drop
|
|
23
|
+
description: Fires on successful drop with detail containing files, items, and text.
|
|
24
|
+
|
|
25
|
+
exposes:
|
|
26
|
+
- name: data-drop-zone-over
|
|
27
|
+
description: Present and set to "true" while dragging over the host.
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- html: |
|
|
31
|
+
<aui-panel traits="drop-zone">Drop files here</aui-panel>
|
|
32
|
+
description: Basic drop zone accepting all file types.
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-panel traits="{ trait: 'drop-zone', accept: 'image/*,text/plain' }">
|
|
35
|
+
Drop images or text
|
|
36
|
+
</aui-panel>
|
|
37
|
+
description: Drop zone restricted to images and plain text.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: edit
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Inline edit mode with commit and cancel support.
|
|
5
|
+
description: >
|
|
6
|
+
Makes the host content-editable on a configurable activation event
|
|
7
|
+
(default: dblclick). Commits the edit on blur or Enter depending on
|
|
8
|
+
configuration, and cancels on Escape restoring original text. Emits
|
|
9
|
+
edit-commit and edit-cancel events with value details.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: event
|
|
13
|
+
type: string
|
|
14
|
+
default: "dblclick"
|
|
15
|
+
description: DOM event that activates edit mode.
|
|
16
|
+
- name: commit
|
|
17
|
+
type: string
|
|
18
|
+
default: "blur"
|
|
19
|
+
description: Trigger for committing the edit ("blur" or "enter").
|
|
20
|
+
|
|
21
|
+
events:
|
|
22
|
+
- name: edit-commit
|
|
23
|
+
description: Fires on commit with detail containing value and previous text.
|
|
24
|
+
- name: edit-cancel
|
|
25
|
+
description: Fires when the edit is cancelled via Escape.
|
|
26
|
+
|
|
27
|
+
exposes:
|
|
28
|
+
- name: data-edit-editing
|
|
29
|
+
description: Present while the host is in edit mode.
|
|
30
|
+
|
|
31
|
+
examples:
|
|
32
|
+
- html: |
|
|
33
|
+
<aui-label traits="edit">Double-click to edit</aui-label>
|
|
34
|
+
description: Basic inline editing with double-click activation.
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-label traits="{ trait: 'edit', event: 'dblclick', commit: 'enter' }">
|
|
37
|
+
Edit me
|
|
38
|
+
</aui-label>
|
|
39
|
+
description: Edit mode that commits on Enter instead of blur.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: flip
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: 3D card flip animation toggled on press.
|
|
5
|
+
description: >
|
|
6
|
+
Toggles a 3D flip state on the host element when a press event fires.
|
|
7
|
+
The host should contain two children representing the front and back
|
|
8
|
+
faces. All visual styling (perspective, transforms, backface-visibility,
|
|
9
|
+
transitions) is handled in companion CSS. The JS only toggles the
|
|
10
|
+
data-flip-flipped attribute.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: duration
|
|
14
|
+
type: string
|
|
15
|
+
default: "600"
|
|
16
|
+
description: Flip animation duration in milliseconds.
|
|
17
|
+
- name: direction
|
|
18
|
+
type: string
|
|
19
|
+
default: "horizontal"
|
|
20
|
+
description: Flip axis — "horizontal" rotates around Y, "vertical" rotates around X.
|
|
21
|
+
|
|
22
|
+
events: []
|
|
23
|
+
|
|
24
|
+
exposes:
|
|
25
|
+
- name: data-flip-flipped
|
|
26
|
+
description: Set to "true" when the card is flipped, "false" when showing the front face.
|
|
27
|
+
|
|
28
|
+
examples:
|
|
29
|
+
- html: |
|
|
30
|
+
<aui-card traits="flip">
|
|
31
|
+
<div class="front">Front</div>
|
|
32
|
+
<div class="back">Back</div>
|
|
33
|
+
</aui-card>
|
|
34
|
+
description: Basic horizontal flip card.
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-card traits="{ trait: 'flip', direction: 'vertical', duration: '400' }">
|
|
37
|
+
<div class="front">Front</div>
|
|
38
|
+
<div class="back">Back</div>
|
|
39
|
+
</aui-card>
|
|
40
|
+
description: Vertical flip with a faster animation.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: gateway
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: DOM portal that moves host children to a target container.
|
|
5
|
+
description: >
|
|
6
|
+
Moves the host element's children to a target container elsewhere in
|
|
7
|
+
the DOM (default: body). Restores children to their original position
|
|
8
|
+
on detach. Useful for overlays, modals, and tooltips that need to
|
|
9
|
+
escape stacking context or overflow constraints.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: target
|
|
13
|
+
type: string
|
|
14
|
+
default: "body"
|
|
15
|
+
description: CSS selector for the destination container.
|
|
16
|
+
|
|
17
|
+
events: []
|
|
18
|
+
|
|
19
|
+
exposes:
|
|
20
|
+
- name: data-gateway-active
|
|
21
|
+
description: Present and set to "true" while children are portaled.
|
|
22
|
+
|
|
23
|
+
examples:
|
|
24
|
+
- html: |
|
|
25
|
+
<aui-overlay traits="gateway">
|
|
26
|
+
<div>Portaled content</div>
|
|
27
|
+
</aui-overlay>
|
|
28
|
+
description: Basic usage portaling children to body.
|
|
29
|
+
- html: |
|
|
30
|
+
<aui-overlay traits="{ trait: 'gateway', target: '#portal-root' }">
|
|
31
|
+
<div>Custom target</div>
|
|
32
|
+
</aui-overlay>
|
|
33
|
+
description: Portal to a specific container element.
|