@agent-ui-kit/web-components 0.0.2 → 0.0.4
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/dist/favicon/apple-touch-icon.png +0 -0
- package/dist/favicon/favicon-96x96.png +0 -0
- package/dist/favicon/favicon.ico +0 -0
- package/dist/favicon/favicon.svg +1 -0
- package/dist/favicon/site.webmanifest +21 -0
- package/dist/favicon/web-app-manifest-192x192.png +0 -0
- package/dist/favicon/web-app-manifest-512x512.png +0 -0
- package/dist/icon.svg +4 -0
- package/package.json +4 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: hover
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Tracks hover state with optional enter/leave delays.
|
|
5
|
+
description: >
|
|
6
|
+
Monitors mouseenter and mouseleave events on the host element, exposing
|
|
7
|
+
a boolean active state via data-hover-active. Supports configurable
|
|
8
|
+
enter and leave delays to debounce rapid pointer movement. Pending
|
|
9
|
+
timers are cancelled when the opposite event fires, preventing flicker.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: delay
|
|
13
|
+
type: string
|
|
14
|
+
default: "0"
|
|
15
|
+
description: Milliseconds to wait after mouseenter before activating.
|
|
16
|
+
- name: leave-delay
|
|
17
|
+
type: string
|
|
18
|
+
default: "0"
|
|
19
|
+
description: Milliseconds to wait after mouseleave before deactivating.
|
|
20
|
+
|
|
21
|
+
events:
|
|
22
|
+
- name: hover-enter
|
|
23
|
+
description: Fires when the host becomes hovered (after delay).
|
|
24
|
+
- name: hover-leave
|
|
25
|
+
description: Fires when the host is no longer hovered (after leave-delay).
|
|
26
|
+
|
|
27
|
+
exposes:
|
|
28
|
+
- name: data-hover-active
|
|
29
|
+
description: Present and set to "true" while the host is hovered.
|
|
30
|
+
|
|
31
|
+
examples:
|
|
32
|
+
- html: |
|
|
33
|
+
<aui-button traits="hover">Hover me</aui-button>
|
|
34
|
+
description: Basic hover tracking with no delay.
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-card traits="{ trait: 'hover', delay: '200', leave-delay: '100' }">
|
|
37
|
+
Content
|
|
38
|
+
</aui-card>
|
|
39
|
+
description: Debounced hover with 200ms enter delay and 100ms leave delay.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: intersect
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: IntersectionObserver wrapper exposing viewport visibility state.
|
|
5
|
+
description: >
|
|
6
|
+
Wraps the IntersectionObserver API to track whether the host element
|
|
7
|
+
is visible in the viewport. Exposes a visible boolean state and emits
|
|
8
|
+
intersect events with intersection ratio. Supports configurable
|
|
9
|
+
threshold, root margin, and a once mode that disconnects after first
|
|
10
|
+
intersection.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: threshold
|
|
14
|
+
type: string
|
|
15
|
+
default: "0"
|
|
16
|
+
description: Intersection ratio threshold (0 to 1) to trigger visibility.
|
|
17
|
+
- name: root-margin
|
|
18
|
+
type: string
|
|
19
|
+
default: "0px"
|
|
20
|
+
description: Root margin for the IntersectionObserver.
|
|
21
|
+
- name: once
|
|
22
|
+
type: string
|
|
23
|
+
default: "false"
|
|
24
|
+
description: When "true", disconnects the observer after the first intersection.
|
|
25
|
+
|
|
26
|
+
events:
|
|
27
|
+
- name: intersect
|
|
28
|
+
description: Fires when intersection state changes, with isIntersecting and ratio in detail.
|
|
29
|
+
|
|
30
|
+
exposes:
|
|
31
|
+
- name: data-intersect-visible
|
|
32
|
+
description: Present and set to "true" when the host is intersecting the viewport.
|
|
33
|
+
|
|
34
|
+
examples:
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-card traits="intersect">Lazy content</aui-card>
|
|
37
|
+
description: Basic viewport visibility tracking.
|
|
38
|
+
- html: |
|
|
39
|
+
<aui-card traits="{ trait: 'intersect', threshold: '0.5', once: 'true' }">
|
|
40
|
+
Animate once visible
|
|
41
|
+
</aui-card>
|
|
42
|
+
description: Fire once when 50% of the element is visible.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: link-paste
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Detects URLs in pasted text and emits link-paste events.
|
|
5
|
+
description: >
|
|
6
|
+
Listens for paste events on the host element and scans the pasted
|
|
7
|
+
text for URLs. When a URL is detected, exposes it via data-link-paste-url
|
|
8
|
+
and emits a link-paste event with the URL and full pasted text. Useful
|
|
9
|
+
for embed previews and automatic link handling.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: auto
|
|
13
|
+
type: string
|
|
14
|
+
default: "true"
|
|
15
|
+
description: When "true", automatically detects URLs on paste.
|
|
16
|
+
|
|
17
|
+
events:
|
|
18
|
+
- name: link-paste
|
|
19
|
+
description: Fires when a URL is detected in pasted text, with url and text in detail.
|
|
20
|
+
|
|
21
|
+
exposes:
|
|
22
|
+
- name: data-link-paste-url
|
|
23
|
+
description: The detected URL from the most recent paste, or empty when none.
|
|
24
|
+
|
|
25
|
+
examples:
|
|
26
|
+
- html: |
|
|
27
|
+
<aui-editor traits="link-paste">Paste a URL here</aui-editor>
|
|
28
|
+
description: Basic link paste detection.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: linked-scroll
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Bidirectional scroll sync between two elements by percentage.
|
|
5
|
+
description: >
|
|
6
|
+
Synchronizes scroll position between the host and a target element
|
|
7
|
+
using scroll percentage rather than absolute pixels, so it works
|
|
8
|
+
with different-sized content. Supports restricting sync to x, y,
|
|
9
|
+
or both axes. Uses a syncing guard to prevent infinite feedback loops.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: target
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
description: CSS selector for the scroll sync partner (required).
|
|
16
|
+
- name: axis
|
|
17
|
+
type: string
|
|
18
|
+
default: "both"
|
|
19
|
+
description: Axis to sync — "both", "x", or "y".
|
|
20
|
+
|
|
21
|
+
events: []
|
|
22
|
+
|
|
23
|
+
exposes:
|
|
24
|
+
- name: data-linked-scroll-syncing
|
|
25
|
+
description: Present and set to "true" during active scroll synchronization.
|
|
26
|
+
|
|
27
|
+
examples:
|
|
28
|
+
- html: |
|
|
29
|
+
<div traits="{ trait: 'linked-scroll', target: '#preview' }">
|
|
30
|
+
Editor content
|
|
31
|
+
</div>
|
|
32
|
+
description: Sync scroll with a preview pane.
|
|
33
|
+
- html: |
|
|
34
|
+
<div traits="{ trait: 'linked-scroll', target: '#preview', axis: 'y' }">
|
|
35
|
+
Vertical sync only
|
|
36
|
+
</div>
|
|
37
|
+
description: Sync only vertical scroll position.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: list-navigate
|
|
2
|
+
type: trait
|
|
3
|
+
category: focus
|
|
4
|
+
summary: Arrow key navigation and type-ahead search in a list.
|
|
5
|
+
description: >
|
|
6
|
+
Adds keyboard navigation to a list of child elements. Supports arrow
|
|
7
|
+
keys for moving a highlight indicator, Home/End for jumping to
|
|
8
|
+
extremes, Enter for activation, and type-ahead character search that
|
|
9
|
+
matches against child text content with a configurable timeout.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: selector
|
|
13
|
+
type: string
|
|
14
|
+
default: "> *"
|
|
15
|
+
description: CSS selector for navigable children.
|
|
16
|
+
- name: typeahead
|
|
17
|
+
type: string
|
|
18
|
+
default: "true"
|
|
19
|
+
description: Enable type-ahead character search.
|
|
20
|
+
- name: timeout
|
|
21
|
+
type: string
|
|
22
|
+
default: "500"
|
|
23
|
+
description: Milliseconds before the type-ahead buffer resets.
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
- name: activate
|
|
27
|
+
description: Fires on Enter with the current highlight index in detail.
|
|
28
|
+
|
|
29
|
+
exposes:
|
|
30
|
+
- name: data-list-navigate-index
|
|
31
|
+
description: The current highlighted item index.
|
|
32
|
+
|
|
33
|
+
examples:
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-list traits="list-navigate">
|
|
36
|
+
<li>Apple</li>
|
|
37
|
+
<li>Banana</li>
|
|
38
|
+
<li>Cherry</li>
|
|
39
|
+
</aui-list>
|
|
40
|
+
description: Basic arrow key navigation in a list.
|
|
41
|
+
- html: |
|
|
42
|
+
<aui-list traits="{ trait: 'list-navigate', selector: '> li', typeahead: 'false' }">
|
|
43
|
+
<li>Item 1</li>
|
|
44
|
+
<li>Item 2</li>
|
|
45
|
+
</aui-list>
|
|
46
|
+
description: Navigation without type-ahead search.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: magnet
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Host subtly follows and tilts toward the cursor on hover.
|
|
5
|
+
description: >
|
|
6
|
+
Applies perspective-based transforms to the host element so it
|
|
7
|
+
follows and tilts toward the mouse cursor. Uses CSS custom properties
|
|
8
|
+
for translation and rotation values. Animates smoothly back to
|
|
9
|
+
center on mouse leave. Configurable strength and tilt intensity.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: strength
|
|
13
|
+
type: string
|
|
14
|
+
default: "10"
|
|
15
|
+
description: Maximum translation distance in pixels.
|
|
16
|
+
- name: tilt
|
|
17
|
+
type: string
|
|
18
|
+
default: "5"
|
|
19
|
+
description: Maximum tilt rotation in degrees.
|
|
20
|
+
|
|
21
|
+
events: []
|
|
22
|
+
|
|
23
|
+
exposes: []
|
|
24
|
+
|
|
25
|
+
examples:
|
|
26
|
+
- html: |
|
|
27
|
+
<aui-card traits="magnet">Hover to see the effect</aui-card>
|
|
28
|
+
description: Basic magnetic follow effect.
|
|
29
|
+
- html: |
|
|
30
|
+
<aui-card traits="{ trait: 'magnet', strength: '15', tilt: '8' }">
|
|
31
|
+
Strong magnet
|
|
32
|
+
</aui-card>
|
|
33
|
+
description: Increased strength and tilt.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: mention
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Detects @mentions in text input and emits search events.
|
|
5
|
+
description: >
|
|
6
|
+
Watches for a trigger character (default: @) in text input and emits
|
|
7
|
+
mention-search events as the user types a mention query. Listens for
|
|
8
|
+
mention-select events to insert the chosen mention text. Works with
|
|
9
|
+
both contenteditable elements and native input/textarea. Exposes an
|
|
10
|
+
active state while a mention is being typed.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: trigger
|
|
14
|
+
type: string
|
|
15
|
+
default: "@"
|
|
16
|
+
description: Character that triggers mention detection.
|
|
17
|
+
- name: min-length
|
|
18
|
+
type: string
|
|
19
|
+
default: "1"
|
|
20
|
+
description: Minimum query length before emitting search events.
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
- name: mention-search
|
|
24
|
+
description: Fires as the user types after the trigger, with query in detail.
|
|
25
|
+
- name: mention-select
|
|
26
|
+
description: Listened for externally to insert the chosen mention text.
|
|
27
|
+
|
|
28
|
+
exposes:
|
|
29
|
+
- name: data-mention-active
|
|
30
|
+
description: Present while the user is actively typing a mention.
|
|
31
|
+
|
|
32
|
+
examples:
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-input traits="mention">Type @ to mention someone</aui-input>
|
|
35
|
+
description: Basic mention detection with @ trigger.
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-input traits="{ trait: 'mention', trigger: '@', min-length: '2' }">
|
|
38
|
+
Mention with minimum 2 characters
|
|
39
|
+
</aui-input>
|
|
40
|
+
description: Require at least 2 characters before searching.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: modal
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Modal overlay using the Popover API with focus trap and backdrop.
|
|
5
|
+
description: >
|
|
6
|
+
Promotes the host to the top layer as a modal overlay (popover="manual")
|
|
7
|
+
with backdrop click dismiss, focus trapping via inert siblings, and
|
|
8
|
+
CSS anchor positioning. Restores focus to the previously focused element
|
|
9
|
+
on close. Supports configurable animations and anchor placement.
|
|
10
|
+
config:
|
|
11
|
+
- closable: Allow closing via Escape or backdrop click ('true' | 'false', default 'true')
|
|
12
|
+
- anchor: CSS selector for anchor element (empty = centered)
|
|
13
|
+
- placement: CSS position-area value (default 'block-end span-inline-end')
|
|
14
|
+
- type: Popover API mode (default 'manual')
|
|
15
|
+
- matchWidth: Match anchor inline size ('true' | 'false', default 'false')
|
|
16
|
+
- animation: Entry/exit animation ('scale' | 'fade' | 'hinge' | 'none', default 'scale')
|
|
17
|
+
events:
|
|
18
|
+
- overlay-open: Fires when modal opens
|
|
19
|
+
- overlay-close: Fires when modal closes
|
|
20
|
+
exposes:
|
|
21
|
+
- data-modal-open: Boolean indicating whether the modal is open
|
|
22
|
+
examples:
|
|
23
|
+
- html: |
|
|
24
|
+
<aui-panel traits="modal">Modal content</aui-panel>
|
|
25
|
+
description: Basic centered modal.
|
|
26
|
+
- html: |
|
|
27
|
+
<aui-panel traits="{ trait: 'modal', anchor: '#btn' }">Anchored modal</aui-panel>
|
|
28
|
+
description: Modal anchored to a button element.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: noodle
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Draws an SVG curved line connecting the host to a target element.
|
|
5
|
+
description: >
|
|
6
|
+
Creates an SVG overlay with a cubic bezier path connecting the center
|
|
7
|
+
of the host element to the center of a target element. Automatically
|
|
8
|
+
updates on scroll, resize, and size changes via ResizeObserver.
|
|
9
|
+
Configurable color, stroke width, and curvature.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: target
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
description: CSS selector for the element to connect to (required).
|
|
16
|
+
- name: color
|
|
17
|
+
type: string
|
|
18
|
+
default: "currentColor"
|
|
19
|
+
description: Stroke color of the connecting line.
|
|
20
|
+
- name: width
|
|
21
|
+
type: string
|
|
22
|
+
default: "2"
|
|
23
|
+
description: Stroke width of the connecting line.
|
|
24
|
+
- name: curvature
|
|
25
|
+
type: string
|
|
26
|
+
default: "0.5"
|
|
27
|
+
description: Curvature factor for the bezier control points (0 = straight, 1 = very curved).
|
|
28
|
+
|
|
29
|
+
events: []
|
|
30
|
+
|
|
31
|
+
exposes:
|
|
32
|
+
- name: data-noodle-connected
|
|
33
|
+
description: Present and set to "true" when the target element is found and connected.
|
|
34
|
+
|
|
35
|
+
examples:
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-node traits="{ trait: 'noodle', target: '#other-node' }">
|
|
38
|
+
Source
|
|
39
|
+
</aui-node>
|
|
40
|
+
description: Basic connection line between two elements.
|
|
41
|
+
- html: |
|
|
42
|
+
<aui-node traits="{ trait: 'noodle', target: '.peer', color: '#ff6b6b', width: '3' }">
|
|
43
|
+
Styled connection
|
|
44
|
+
</aui-node>
|
|
45
|
+
description: Custom color and width for the connecting line.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: overlay
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Popover and modal overlay traits built on the Popover API.
|
|
5
|
+
description: >
|
|
6
|
+
Factory module that creates two presentation traits — popover and modal —
|
|
7
|
+
both built on the Popover API with CSS anchor positioning. Popover uses
|
|
8
|
+
auto mode with light dismiss; modal uses manual mode with backdrop click
|
|
9
|
+
handling and focus trapping via inert. Supports configurable anchor
|
|
10
|
+
positioning, animations, and width matching.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: closable
|
|
14
|
+
type: string
|
|
15
|
+
default: "true"
|
|
16
|
+
description: Whether the overlay can be dismissed.
|
|
17
|
+
- name: anchor
|
|
18
|
+
type: string
|
|
19
|
+
default: ""
|
|
20
|
+
description: CSS selector for the anchor element (empty for centered).
|
|
21
|
+
- name: placement
|
|
22
|
+
type: string
|
|
23
|
+
default: "block-end span-inline-end"
|
|
24
|
+
description: CSS position-area value for anchor positioning.
|
|
25
|
+
- name: type
|
|
26
|
+
type: string
|
|
27
|
+
default: "auto"
|
|
28
|
+
description: Popover API mode — "auto" (light dismiss) or "manual".
|
|
29
|
+
- name: matchWidth
|
|
30
|
+
type: string
|
|
31
|
+
default: "false"
|
|
32
|
+
description: Whether to match the anchor element's inline size.
|
|
33
|
+
- name: animation
|
|
34
|
+
type: string
|
|
35
|
+
default: "scale"
|
|
36
|
+
description: Animation style — "scale", "fade", "hinge", or "none".
|
|
37
|
+
|
|
38
|
+
events:
|
|
39
|
+
- name: overlay-open
|
|
40
|
+
description: Fires when the overlay opens.
|
|
41
|
+
- name: overlay-close
|
|
42
|
+
description: Fires when the overlay closes.
|
|
43
|
+
|
|
44
|
+
exposes:
|
|
45
|
+
- name: data-popover-open
|
|
46
|
+
description: Present on popover variant when open.
|
|
47
|
+
- name: data-modal-open
|
|
48
|
+
description: Present on modal variant when open.
|
|
49
|
+
|
|
50
|
+
examples:
|
|
51
|
+
- html: |
|
|
52
|
+
<aui-panel traits="popover">Popover content</aui-panel>
|
|
53
|
+
description: Basic centered popover.
|
|
54
|
+
- html: |
|
|
55
|
+
<aui-panel traits="{ trait: 'modal', anchor: '#btn' }">
|
|
56
|
+
Modal content
|
|
57
|
+
</aui-panel>
|
|
58
|
+
description: Anchored modal overlay.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: pan-zoom
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Makes any element a pannable and zoomable canvas surface.
|
|
5
|
+
description: >
|
|
6
|
+
Adds pan and zoom gestures to the host element. Supports middle-click
|
|
7
|
+
drag or Space+drag for panning, Ctrl+wheel for zooming toward the
|
|
8
|
+
pointer, and Ctrl+double-click to reset. Sets CSS custom properties
|
|
9
|
+
(--_pan-x, --_pan-y, --_pan-zoom) for transform application.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: min-zoom
|
|
13
|
+
type: string
|
|
14
|
+
default: "0.1"
|
|
15
|
+
description: Minimum zoom scale.
|
|
16
|
+
- name: max-zoom
|
|
17
|
+
type: string
|
|
18
|
+
default: "5"
|
|
19
|
+
description: Maximum zoom scale.
|
|
20
|
+
- name: zoom-step
|
|
21
|
+
type: string
|
|
22
|
+
default: "0.1"
|
|
23
|
+
description: Zoom increment per wheel tick.
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
- name: pan-zoom-change
|
|
27
|
+
description: Fires on pan or zoom change with x, y, and scale in detail.
|
|
28
|
+
|
|
29
|
+
exposes:
|
|
30
|
+
- name: data-pan-zoom-scale
|
|
31
|
+
description: Current zoom scale value.
|
|
32
|
+
- name: data-pan-zoom-x
|
|
33
|
+
description: Current horizontal pan offset.
|
|
34
|
+
- name: data-pan-zoom-y
|
|
35
|
+
description: Current vertical pan offset.
|
|
36
|
+
|
|
37
|
+
examples:
|
|
38
|
+
- html: |
|
|
39
|
+
<div traits="pan-zoom">
|
|
40
|
+
<img src="large-image.png" />
|
|
41
|
+
</div>
|
|
42
|
+
description: Basic pannable and zoomable container.
|
|
43
|
+
- html: |
|
|
44
|
+
<div traits="{ trait: 'pan-zoom', min-zoom: '0.25', max-zoom: '4' }">
|
|
45
|
+
Canvas content
|
|
46
|
+
</div>
|
|
47
|
+
description: Custom zoom range.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: parallax
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Scroll-based parallax shifting via CSS custom property.
|
|
5
|
+
description: >
|
|
6
|
+
Shifts the host element at a fraction of the scroll speed to create
|
|
7
|
+
a depth-of-field parallax effect. Calculates offset based on the
|
|
8
|
+
host's position relative to the viewport center and applies it
|
|
9
|
+
through a CSS custom property. Uses requestAnimationFrame for
|
|
10
|
+
smooth, jank-free updates.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: speed
|
|
14
|
+
type: string
|
|
15
|
+
default: "0.5"
|
|
16
|
+
description: Parallax speed multiplier. 0 means no shift, 1 means full scroll speed.
|
|
17
|
+
- name: direction
|
|
18
|
+
type: string
|
|
19
|
+
default: "vertical"
|
|
20
|
+
description: Parallax direction — "vertical" or "horizontal".
|
|
21
|
+
|
|
22
|
+
events: []
|
|
23
|
+
|
|
24
|
+
exposes: []
|
|
25
|
+
|
|
26
|
+
examples:
|
|
27
|
+
- html: |
|
|
28
|
+
<aui-section traits="parallax">
|
|
29
|
+
Background content
|
|
30
|
+
</aui-section>
|
|
31
|
+
description: Basic vertical parallax at half scroll speed.
|
|
32
|
+
- html: |
|
|
33
|
+
<aui-section traits="{ trait: 'parallax', speed: '0.3', direction: 'horizontal' }">
|
|
34
|
+
Side-scrolling content
|
|
35
|
+
</aui-section>
|
|
36
|
+
description: Slower horizontal parallax effect.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: persist
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Saves and restores arbitrary state to localStorage.
|
|
5
|
+
description: >
|
|
6
|
+
Generic persistence primitive that saves and restores state via
|
|
7
|
+
localStorage. On attach, loads saved state and emits a persist-load
|
|
8
|
+
event. Listens for persist-save events from the host to debounce
|
|
9
|
+
saves to localStorage. Handles quota exceeded and private browsing
|
|
10
|
+
gracefully.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: key
|
|
14
|
+
type: string
|
|
15
|
+
default: ""
|
|
16
|
+
description: localStorage key for the persisted state (required).
|
|
17
|
+
- name: debounce
|
|
18
|
+
type: string
|
|
19
|
+
default: "300"
|
|
20
|
+
description: Milliseconds to debounce save operations.
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
- name: persist-load
|
|
24
|
+
description: Fires on attach with the restored state in detail.
|
|
25
|
+
- name: persist-save
|
|
26
|
+
description: Dispatched by the host to trigger a save with state in detail.
|
|
27
|
+
|
|
28
|
+
exposes:
|
|
29
|
+
- name: data-persist-ready
|
|
30
|
+
description: Present after initial load is complete.
|
|
31
|
+
|
|
32
|
+
examples:
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-panes traits="{ trait: 'persist', key: 'my-layout' }">
|
|
35
|
+
Persisted content
|
|
36
|
+
</aui-panes>
|
|
37
|
+
description: Basic persistence with a localStorage key.
|
|
38
|
+
- html: |
|
|
39
|
+
<aui-panes traits="{ trait: 'persist', key: 'my-layout', debounce: '500' }">
|
|
40
|
+
Debounced saves
|
|
41
|
+
</aui-panes>
|
|
42
|
+
description: Custom debounce interval for save operations.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: popover
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Non-modal overlay using the Popover API with CSS anchor positioning.
|
|
5
|
+
description: >
|
|
6
|
+
Promotes the host to the top layer as a non-modal popover (popover="auto")
|
|
7
|
+
with light dismiss. Supports anchor positioning via CSS position-anchor,
|
|
8
|
+
configurable placement, width matching, and entry/exit animations. Syncs
|
|
9
|
+
state with browser-initiated popover toggles.
|
|
10
|
+
config:
|
|
11
|
+
- closable: Allow closing via Escape or light dismiss ('true' | 'false', default 'true')
|
|
12
|
+
- anchor: CSS selector for anchor element (empty = centered)
|
|
13
|
+
- placement: CSS position-area value (default 'block-end span-inline-end')
|
|
14
|
+
- type: Popover API mode (default 'auto')
|
|
15
|
+
- matchWidth: Match anchor inline size ('true' | 'false', default 'false')
|
|
16
|
+
- animation: Entry/exit animation ('scale' | 'fade' | 'hinge' | 'none', default 'scale')
|
|
17
|
+
events:
|
|
18
|
+
- overlay-open: Fires when popover opens
|
|
19
|
+
- overlay-close: Fires when popover closes
|
|
20
|
+
exposes:
|
|
21
|
+
- data-popover-open: Boolean indicating whether the popover is open
|
|
22
|
+
examples:
|
|
23
|
+
- html: |
|
|
24
|
+
<aui-panel traits="popover">Popover content</aui-panel>
|
|
25
|
+
description: Basic centered popover.
|
|
26
|
+
- html: |
|
|
27
|
+
<div traits="{ trait: 'popover', anchor: '#trigger' }">Anchored content</div>
|
|
28
|
+
description: Popover anchored to a trigger element.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: present
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Show/hide the host with CSS transition state attributes.
|
|
5
|
+
description: >
|
|
6
|
+
Manages visibility of the host element through data attributes that
|
|
7
|
+
CSS can hook into for transitions. Sets data-present-entering during
|
|
8
|
+
show transitions, data-present-leaving during hide transitions, and
|
|
9
|
+
data-present-hidden when fully hidden. Responds to toggle, show,
|
|
10
|
+
and hide action events.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: visible
|
|
14
|
+
type: string
|
|
15
|
+
default: "true"
|
|
16
|
+
description: Initial visibility state.
|
|
17
|
+
- name: transition
|
|
18
|
+
type: string
|
|
19
|
+
default: "200"
|
|
20
|
+
description: Transition duration in milliseconds.
|
|
21
|
+
|
|
22
|
+
events: []
|
|
23
|
+
|
|
24
|
+
exposes:
|
|
25
|
+
- name: data-present-visible
|
|
26
|
+
description: Boolean indicating current visibility state.
|
|
27
|
+
- name: data-present-entering
|
|
28
|
+
description: Present during the show transition.
|
|
29
|
+
- name: data-present-leaving
|
|
30
|
+
description: Present during the hide transition.
|
|
31
|
+
- name: data-present-hidden
|
|
32
|
+
description: Present when the element is fully hidden.
|
|
33
|
+
|
|
34
|
+
examples:
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-toast traits="present">Visible by default</aui-toast>
|
|
37
|
+
description: Basic show/hide with default transition.
|
|
38
|
+
- html: |
|
|
39
|
+
<aui-toast traits="{ trait: 'present', visible: 'false', transition: '300' }">
|
|
40
|
+
Initially hidden
|
|
41
|
+
</aui-toast>
|
|
42
|
+
description: Initially hidden with 300ms transition duration.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: press-hold
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Emits a hold event after a long press on the host.
|
|
5
|
+
description: >
|
|
6
|
+
Starts a timer on pointerdown and emits a hold event if the pointer
|
|
7
|
+
remains down for the configured delay. Cancels if the pointer is
|
|
8
|
+
released, leaves the host, or is cancelled before the threshold.
|
|
9
|
+
Useful for context menus, destructive action confirmations, or
|
|
10
|
+
secondary interactions.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: delay
|
|
14
|
+
type: string
|
|
15
|
+
default: "500"
|
|
16
|
+
description: Milliseconds the pointer must be held before firing the hold event.
|
|
17
|
+
|
|
18
|
+
events:
|
|
19
|
+
- name: hold
|
|
20
|
+
description: Fires when the hold threshold is reached.
|
|
21
|
+
|
|
22
|
+
exposes:
|
|
23
|
+
- name: data-press-hold-held
|
|
24
|
+
description: Present after a successful hold, removed on pointer release.
|
|
25
|
+
|
|
26
|
+
examples:
|
|
27
|
+
- html: |
|
|
28
|
+
<aui-button traits="press-hold">Hold me</aui-button>
|
|
29
|
+
description: Basic press-and-hold with default 500ms delay.
|
|
30
|
+
- html: |
|
|
31
|
+
<aui-button traits="{ trait: 'press-hold', delay: '600' }">
|
|
32
|
+
Long press
|
|
33
|
+
</aui-button>
|
|
34
|
+
description: Custom 600ms hold threshold.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: range-select
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Shift/Cmd-click range and multi-selection on host children.
|
|
5
|
+
description: >
|
|
6
|
+
Adds range and multi-selection behavior to a list of child elements.
|
|
7
|
+
Shift-click selects a contiguous range, Cmd/Ctrl-click toggles
|
|
8
|
+
individual items, and plain click selects a single item. Manages
|
|
9
|
+
selection state via configurable attributes on children.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: selector
|
|
13
|
+
type: string
|
|
14
|
+
default: "> *"
|
|
15
|
+
description: CSS selector for selectable children.
|
|
16
|
+
- name: attr
|
|
17
|
+
type: string
|
|
18
|
+
default: "selected"
|
|
19
|
+
description: Attribute name set on selected children.
|
|
20
|
+
|
|
21
|
+
events:
|
|
22
|
+
- name: selection-change
|
|
23
|
+
description: Fires on selection change with selected indices and count in detail.
|
|
24
|
+
|
|
25
|
+
exposes:
|
|
26
|
+
- name: data-range-select-count
|
|
27
|
+
description: Number of currently selected items.
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- html: |
|
|
31
|
+
<aui-list traits="range-select">
|
|
32
|
+
<div>Item 1</div>
|
|
33
|
+
<div>Item 2</div>
|
|
34
|
+
<div>Item 3</div>
|
|
35
|
+
</aui-list>
|
|
36
|
+
description: Basic range selection on list items.
|
|
37
|
+
- html: |
|
|
38
|
+
<aui-list traits="{ trait: 'range-select', selector: '.item', attr: 'selected' }">
|
|
39
|
+
<div class="item">A</div>
|
|
40
|
+
<div class="item">B</div>
|
|
41
|
+
</aui-list>
|
|
42
|
+
description: Custom selector and attribute for selection.
|