@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,39 @@
|
|
|
1
|
+
name: resize
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Handle-based resize of the host element at configured edges and corners.
|
|
5
|
+
description: >
|
|
6
|
+
Creates transparent draggable handles at the specified edges and corners
|
|
7
|
+
of the host element. Pointer drag on a handle resizes the host with
|
|
8
|
+
configurable minimum dimensions. Emits aui:resize-start, aui:resize-move, and
|
|
9
|
+
aui:resize-end events with current width and height.
|
|
10
|
+
config:
|
|
11
|
+
- name: handles
|
|
12
|
+
type: string
|
|
13
|
+
default: "se"
|
|
14
|
+
description: Comma-separated edges/corners to add handles ('n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw').
|
|
15
|
+
- name: min-width
|
|
16
|
+
type: string
|
|
17
|
+
default: "50"
|
|
18
|
+
description: Minimum width in pixels.
|
|
19
|
+
- name: min-height
|
|
20
|
+
type: string
|
|
21
|
+
default: "50"
|
|
22
|
+
description: Minimum height in pixels.
|
|
23
|
+
events:
|
|
24
|
+
- name: aui:resize-start
|
|
25
|
+
description: Fires on resize begin, detail contains width and height.
|
|
26
|
+
- name: aui:resize-move
|
|
27
|
+
description: Fires on each pointer move during resize, detail contains width and height.
|
|
28
|
+
- name: aui:resize-end
|
|
29
|
+
description: Fires on resize end, detail contains width and height.
|
|
30
|
+
exposes:
|
|
31
|
+
- name: data-resize-resizing
|
|
32
|
+
description: Present while a resize drag is in progress.
|
|
33
|
+
examples:
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-panel traits="resize">Resizable panel</aui-panel>
|
|
36
|
+
description: Basic resizable panel with south-east handle.
|
|
37
|
+
- html: |
|
|
38
|
+
<aui-panel traits="{ trait: 'resize', handles: 'se,e,s', min-width: '100', min-height: '100' }">Panel</aui-panel>
|
|
39
|
+
description: Resize from three edges with larger minimums.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: ripple
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Adds a Material-style expanding ripple effect on pointer press.
|
|
5
|
+
description: >
|
|
6
|
+
Creates an expanding circular ripple originating from the pointer
|
|
7
|
+
position on pointerdown. The ripple is a span element with CSS
|
|
8
|
+
animation that auto-removes on animationend. Requires companion
|
|
9
|
+
CSS for the .aui-ripple class (position, animation, opacity).
|
|
10
|
+
|
|
11
|
+
config: []
|
|
12
|
+
|
|
13
|
+
events: []
|
|
14
|
+
|
|
15
|
+
exposes: []
|
|
16
|
+
|
|
17
|
+
examples:
|
|
18
|
+
- html: |
|
|
19
|
+
<aui-button traits="ripple">Click me</aui-button>
|
|
20
|
+
description: Basic ripple effect on a button.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: roving-focus
|
|
2
|
+
type: trait
|
|
3
|
+
category: focus
|
|
4
|
+
summary: Arrow key navigation within the host's focusable children.
|
|
5
|
+
description: >
|
|
6
|
+
Implements roving tabindex pattern where all focusable children are set
|
|
7
|
+
to tabindex=-1 except the active one (tabindex=0), making the group a
|
|
8
|
+
single tab stop. Supports horizontal, vertical, or both orientations,
|
|
9
|
+
optional wrapping, Home/End keys, and a configurable child selector.
|
|
10
|
+
config:
|
|
11
|
+
- orientation: Arrow key direction ('horizontal' | 'vertical' | 'both', default 'both')
|
|
12
|
+
- wrap: Wrap around at edges ('true' | 'false', default 'true')
|
|
13
|
+
- selector: CSS selector for focusable children (default includes buttons, links, inputs)
|
|
14
|
+
events: []
|
|
15
|
+
exposes:
|
|
16
|
+
- data-roving-focus-active: Index of the currently focused child
|
|
17
|
+
examples:
|
|
18
|
+
- html: |
|
|
19
|
+
<aui-select mode="bar" traits="roving-focus">
|
|
20
|
+
<span tabindex="0">Item 1</span>
|
|
21
|
+
<span tabindex="0">Item 2</span>
|
|
22
|
+
<span tabindex="0">Item 3</span>
|
|
23
|
+
</aui-select>
|
|
24
|
+
description: Basic roving focus toolbar.
|
|
25
|
+
- html: |
|
|
26
|
+
<aui-select mode="bar" traits="{ trait: 'roving-focus', orientation: 'horizontal', wrap: 'false' }">
|
|
27
|
+
<span tabindex="0">A</span>
|
|
28
|
+
<span tabindex="0">B</span>
|
|
29
|
+
</aui-select>
|
|
30
|
+
description: Horizontal-only navigation without wrapping.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: search
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Full-text search filter that shows/hides host children by substring match.
|
|
5
|
+
description: >
|
|
6
|
+
Filters the host's children by case-insensitive substring match against
|
|
7
|
+
their textContent or a configurable attribute. Responds to search custom
|
|
8
|
+
events and input events from child input elements. Applies a configurable
|
|
9
|
+
debounce delay and exposes the current query and match count.
|
|
10
|
+
config:
|
|
11
|
+
- name: selector
|
|
12
|
+
type: string
|
|
13
|
+
default: "> *"
|
|
14
|
+
description: CSS selector for filterable children.
|
|
15
|
+
- name: attr
|
|
16
|
+
type: string
|
|
17
|
+
default: "textContent"
|
|
18
|
+
description: Attribute or 'textContent' to match against.
|
|
19
|
+
- name: debounce
|
|
20
|
+
type: string
|
|
21
|
+
default: "150"
|
|
22
|
+
description: Debounce delay in milliseconds.
|
|
23
|
+
events:
|
|
24
|
+
- name: search-results
|
|
25
|
+
description: Fires after filtering, detail contains count and query.
|
|
26
|
+
exposes:
|
|
27
|
+
- name: data-search-count
|
|
28
|
+
description: Number of visible matches.
|
|
29
|
+
- name: data-search-query
|
|
30
|
+
description: Current query string.
|
|
31
|
+
examples:
|
|
32
|
+
- html: |
|
|
33
|
+
<aui-list traits="search">
|
|
34
|
+
<div>Apple</div>
|
|
35
|
+
<div>Banana</div>
|
|
36
|
+
<div>Cherry</div>
|
|
37
|
+
</aui-list>
|
|
38
|
+
description: Basic searchable list.
|
|
39
|
+
- html: |
|
|
40
|
+
<aui-list traits="{ trait: 'search', debounce: '200', attr: 'data-label' }">
|
|
41
|
+
<div data-label="Apple">Item 1</div>
|
|
42
|
+
<div data-label="Banana">Item 2</div>
|
|
43
|
+
</aui-list>
|
|
44
|
+
description: Search by data-label attribute with custom debounce.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: selection
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Single or multi-select state management for host children.
|
|
5
|
+
description: >
|
|
6
|
+
Manages selection state on host's child elements via press events.
|
|
7
|
+
Supports single-select (deselects others on press) and multiple-select
|
|
8
|
+
(toggles individual items) modes. Tracks selection via the "selected"
|
|
9
|
+
attribute on children and emits select events with value details.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: mode
|
|
13
|
+
type: string
|
|
14
|
+
default: "single"
|
|
15
|
+
description: Selection mode — "single" or "multiple".
|
|
16
|
+
- name: selector
|
|
17
|
+
type: string
|
|
18
|
+
default: "> *"
|
|
19
|
+
description: CSS selector for selectable children.
|
|
20
|
+
|
|
21
|
+
events:
|
|
22
|
+
- name: select
|
|
23
|
+
description: Fires on selection change with value, selected boolean, and all selected values.
|
|
24
|
+
|
|
25
|
+
exposes:
|
|
26
|
+
- name: data-selection-count
|
|
27
|
+
description: Number of currently selected items.
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- html: |
|
|
31
|
+
<aui-list traits="selection">
|
|
32
|
+
<div data-value="a">Option A</div>
|
|
33
|
+
<div data-value="b">Option B</div>
|
|
34
|
+
</aui-list>
|
|
35
|
+
description: Basic single-select list.
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-list traits="{ trait: 'selection', mode: 'multiple' }">
|
|
38
|
+
<div data-value="1">Item 1</div>
|
|
39
|
+
<div data-value="2">Item 2</div>
|
|
40
|
+
</aui-list>
|
|
41
|
+
description: Multi-select mode.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: shortcut
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Keyboard shortcut binding that emits press on key combo match.
|
|
5
|
+
description: >
|
|
6
|
+
Parses a key combo string (e.g. ctrl+k, meta+shift+p) and listens
|
|
7
|
+
for matching keydown events. When matched, prevents default and
|
|
8
|
+
emits shortcut and press events on the host.
|
|
9
|
+
config:
|
|
10
|
+
- name: key
|
|
11
|
+
type: string
|
|
12
|
+
default: ""
|
|
13
|
+
description: "Key combo string (e.g. ctrl+k, meta+shift+p)."
|
|
14
|
+
- name: global
|
|
15
|
+
type: string
|
|
16
|
+
default: "false"
|
|
17
|
+
description: "Listen on document instead of host."
|
|
18
|
+
events:
|
|
19
|
+
- name: shortcut-trigger
|
|
20
|
+
description: Fires on key combo match with { key } detail.
|
|
21
|
+
exposes: []
|
|
22
|
+
examples:
|
|
23
|
+
- html: |
|
|
24
|
+
<aui-button traits="{ trait: 'shortcut', key: 'ctrl+k' }">Search</aui-button>
|
|
25
|
+
description: Keyboard shortcut on the host element.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: slash-command
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Detects /commands in text input and emits command events.
|
|
5
|
+
description: >
|
|
6
|
+
Watches for a trigger character (default: /) at the start of input
|
|
7
|
+
and emits command-input events as the user types for autocomplete.
|
|
8
|
+
On Enter, parses the command and arguments and emits a command event.
|
|
9
|
+
Optionally restricts to a whitelist of known commands. Works with
|
|
10
|
+
both contenteditable elements and native inputs.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: trigger
|
|
14
|
+
type: string
|
|
15
|
+
default: "/"
|
|
16
|
+
description: Character that starts a command.
|
|
17
|
+
- name: commands
|
|
18
|
+
type: string
|
|
19
|
+
default: ""
|
|
20
|
+
description: Comma-separated whitelist of valid commands (empty allows all).
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
- name: command
|
|
24
|
+
description: Fires on Enter with command name and args in detail.
|
|
25
|
+
- name: command-input
|
|
26
|
+
description: Fires as the user types with the partial command text.
|
|
27
|
+
|
|
28
|
+
exposes:
|
|
29
|
+
- name: data-slash-command-active
|
|
30
|
+
description: Present while the user is actively typing a command.
|
|
31
|
+
|
|
32
|
+
examples:
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-input traits="slash-command">Type /help</aui-input>
|
|
35
|
+
description: Basic slash command detection.
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-input traits="{ trait: 'slash-command', trigger: '/', commands: 'search,help,clear' }">
|
|
38
|
+
Restricted commands
|
|
39
|
+
</aui-input>
|
|
40
|
+
description: Only emit for known commands.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: snap-resize
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Snaps pane resize operations to grid increments.
|
|
5
|
+
description: >
|
|
6
|
+
Listens for aui:panes-resize events and rounds sizes to the nearest grid
|
|
7
|
+
increment. Optionally only snaps while a modifier key is held. Applies
|
|
8
|
+
snapped sizes as flex-basis on the host's children. Designed to work
|
|
9
|
+
with pane layout components.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: grid
|
|
13
|
+
type: string
|
|
14
|
+
default: "50"
|
|
15
|
+
description: Snap increment in pixels.
|
|
16
|
+
- name: modifier
|
|
17
|
+
type: string
|
|
18
|
+
default: ""
|
|
19
|
+
description: Key that must be held to enable snapping (e.g., "Shift"). Empty means always snap.
|
|
20
|
+
|
|
21
|
+
events: []
|
|
22
|
+
|
|
23
|
+
exposes:
|
|
24
|
+
- name: data-snap-resize-grid
|
|
25
|
+
description: The current grid increment value.
|
|
26
|
+
|
|
27
|
+
examples:
|
|
28
|
+
- html: |
|
|
29
|
+
<aui-panes traits="snap-resize">
|
|
30
|
+
<div>Pane 1</div>
|
|
31
|
+
<div>Pane 2</div>
|
|
32
|
+
</aui-panes>
|
|
33
|
+
description: Basic snap resize with default 50px grid.
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-panes traits="{ trait: 'snap-resize', grid: '100', modifier: 'Shift' }">
|
|
36
|
+
<div>Pane 1</div>
|
|
37
|
+
<div>Pane 2</div>
|
|
38
|
+
</aui-panes>
|
|
39
|
+
description: Snap to 100px grid only while Shift is held.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: sort
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Drag-to-reorder with automatic DOM reordering on drop.
|
|
5
|
+
description: >
|
|
6
|
+
Convenience trait that provides drag-to-reorder with a popover ghost
|
|
7
|
+
and automatic DOM repositioning on drop. Shows a gap indicator in
|
|
8
|
+
list modes. Supports axis constraint and optional drag handle.
|
|
9
|
+
For more control (cross-zone, preview mode, drop targets), use
|
|
10
|
+
the drag trait directly.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: selector
|
|
14
|
+
type: string
|
|
15
|
+
default: "> *"
|
|
16
|
+
description: CSS selector for sortable children.
|
|
17
|
+
- name: handle
|
|
18
|
+
type: string
|
|
19
|
+
default: ""
|
|
20
|
+
description: CSS selector for drag handle within each child.
|
|
21
|
+
- name: axis
|
|
22
|
+
type: string
|
|
23
|
+
default: "vertical"
|
|
24
|
+
description: Constraint axis ('vertical' | 'horizontal' | 'both').
|
|
25
|
+
|
|
26
|
+
events:
|
|
27
|
+
- name: sort
|
|
28
|
+
description: Fires on reorder complete. Detail { order } contains string array of data-sort-key values or indices.
|
|
29
|
+
|
|
30
|
+
exposes:
|
|
31
|
+
- name: data-sort-dragging
|
|
32
|
+
description: Present while a sort drag is in progress.
|
|
33
|
+
|
|
34
|
+
examples:
|
|
35
|
+
- html: |
|
|
36
|
+
<div traits="sort">
|
|
37
|
+
<div>Item 1</div>
|
|
38
|
+
<div>Item 2</div>
|
|
39
|
+
<div>Item 3</div>
|
|
40
|
+
</div>
|
|
41
|
+
description: Basic vertical drag-to-reorder list.
|
|
42
|
+
- html: |
|
|
43
|
+
<div traits="{ trait: 'sort', handle: '.grip', axis: 'vertical' }">
|
|
44
|
+
<div><span class="grip">⁞</span> Item 1</div>
|
|
45
|
+
<div><span class="grip">⁞</span> Item 2</div>
|
|
46
|
+
</div>
|
|
47
|
+
description: Sort with a dedicated drag handle.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: store
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Data-driven DOM stamping for list-like components.
|
|
5
|
+
description: >
|
|
6
|
+
Reads data from a ListStore (signal-backed), store attribute, or
|
|
7
|
+
options attribute and stamps aui-option elements into the host or
|
|
8
|
+
a target container. Supports grouped data with configurable group
|
|
9
|
+
wrapper tag names. Reactively re-stamps when the data source changes
|
|
10
|
+
and observes attribute mutations on the host.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: target
|
|
14
|
+
type: string
|
|
15
|
+
default: ":scope"
|
|
16
|
+
description: CSS selector for the stamping container (default is the host itself).
|
|
17
|
+
- name: group-tag
|
|
18
|
+
type: string
|
|
19
|
+
default: "aui-group"
|
|
20
|
+
description: Tag name for group wrapper elements.
|
|
21
|
+
|
|
22
|
+
events: []
|
|
23
|
+
|
|
24
|
+
exposes:
|
|
25
|
+
- name: data-store-count
|
|
26
|
+
description: Total number of stamped items.
|
|
27
|
+
|
|
28
|
+
examples:
|
|
29
|
+
- html: |
|
|
30
|
+
<aui-select traits="store" options='[{"id":"a","label":"Alpha"}]'>
|
|
31
|
+
</aui-select>
|
|
32
|
+
description: Stamp options from a JSON attribute.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: swipe
|
|
2
|
+
type: trait
|
|
3
|
+
category: gesture
|
|
4
|
+
summary: Detects swipe gestures and emits direction, distance, and velocity.
|
|
5
|
+
description: >
|
|
6
|
+
Tracks pointer down and up events to detect swipe gestures. A swipe
|
|
7
|
+
is recognized when the pointer travels beyond the distance threshold
|
|
8
|
+
within the timeout window. Emits direction (left, right, up, down),
|
|
9
|
+
total distance, and velocity. Temporarily exposes the swipe direction
|
|
10
|
+
as a data attribute for CSS-driven transitions.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: threshold
|
|
14
|
+
type: string
|
|
15
|
+
default: "50"
|
|
16
|
+
description: Minimum distance in pixels to qualify as a swipe.
|
|
17
|
+
- name: timeout
|
|
18
|
+
type: string
|
|
19
|
+
default: "300"
|
|
20
|
+
description: Maximum elapsed time in milliseconds for the gesture to count.
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
- name: swipe
|
|
24
|
+
description: Fires on a successful swipe. Detail contains { direction, distance, velocity }.
|
|
25
|
+
|
|
26
|
+
exposes:
|
|
27
|
+
- name: data-swipe-direction
|
|
28
|
+
description: Set to "left", "right", "up", or "down" after a swipe. Cleared after 500ms.
|
|
29
|
+
|
|
30
|
+
examples:
|
|
31
|
+
- html: |
|
|
32
|
+
<aui-card traits="swipe">Swipe me</aui-card>
|
|
33
|
+
description: Basic swipe detection with default thresholds.
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-surface traits="{ trait: 'swipe', threshold: '80', timeout: '400' }">
|
|
36
|
+
Content
|
|
37
|
+
</aui-surface>
|
|
38
|
+
description: Swipe with a longer distance threshold and timeout.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: text-trigger
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Generic text pattern trigger that emits on regex match.
|
|
5
|
+
description: >
|
|
6
|
+
Watches the host's input value and tests it against a configurable
|
|
7
|
+
regex pattern. Emits a text-trigger event when the pattern matches,
|
|
8
|
+
with the match and capture groups in detail. Optionally requires a
|
|
9
|
+
trigger character to be present before matching. Exposes a matched
|
|
10
|
+
state for CSS styling.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: pattern
|
|
14
|
+
type: string
|
|
15
|
+
default: ""
|
|
16
|
+
description: Regular expression pattern to match against input value (required).
|
|
17
|
+
- name: trigger
|
|
18
|
+
type: string
|
|
19
|
+
default: ""
|
|
20
|
+
description: Character that must be present in the value before matching.
|
|
21
|
+
|
|
22
|
+
events:
|
|
23
|
+
- name: text-trigger
|
|
24
|
+
description: Fires when the pattern matches, with match and groups in detail.
|
|
25
|
+
|
|
26
|
+
exposes:
|
|
27
|
+
- name: data-text-trigger-matched
|
|
28
|
+
description: Present when the pattern currently matches the input value.
|
|
29
|
+
|
|
30
|
+
examples:
|
|
31
|
+
- html: |
|
|
32
|
+
<aui-input traits="{ trait: 'text-trigger', pattern: '#[a-zA-Z]+' }">
|
|
33
|
+
Type a hashtag
|
|
34
|
+
</aui-input>
|
|
35
|
+
description: Detect hashtag patterns in input.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: toast
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Transient notification that auto-dismisses and stacks.
|
|
5
|
+
description: >
|
|
6
|
+
Positions the host as a fixed toast notification on screen with
|
|
7
|
+
configurable position and auto-dismiss duration. Stacks with other
|
|
8
|
+
visible toasts by calculating offset from existing notifications.
|
|
9
|
+
Uses CSS transition states for enter and dismiss animations.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: duration
|
|
13
|
+
type: string
|
|
14
|
+
default: "3000"
|
|
15
|
+
description: Auto-dismiss delay in milliseconds (0 for manual dismiss).
|
|
16
|
+
- name: position
|
|
17
|
+
type: string
|
|
18
|
+
default: "bottom-right"
|
|
19
|
+
description: Screen position — "top-right", "top-left", "bottom-right", "bottom-left", "top-center", or "bottom-center".
|
|
20
|
+
- name: stack
|
|
21
|
+
type: string
|
|
22
|
+
default: "true"
|
|
23
|
+
description: Whether to stack with other visible toasts.
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
- name: toast-dismiss
|
|
27
|
+
description: Fires when the toast is dismissed.
|
|
28
|
+
|
|
29
|
+
exposes:
|
|
30
|
+
- name: data-toast-visible
|
|
31
|
+
description: Present while the toast is visible.
|
|
32
|
+
|
|
33
|
+
examples:
|
|
34
|
+
- html: |
|
|
35
|
+
<aui-toast traits="toast">Notification message</aui-toast>
|
|
36
|
+
description: Basic toast with default position and duration.
|
|
37
|
+
- html: |
|
|
38
|
+
<aui-toast traits="{ trait: 'toast', position: 'top-center', duration: '5000' }">
|
|
39
|
+
Important notice
|
|
40
|
+
</aui-toast>
|
|
41
|
+
description: Top-center toast with 5-second duration.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: toggle-scheme
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Cycles color-scheme on a target element between system, light, and dark.
|
|
5
|
+
description: >
|
|
6
|
+
On each press event, advances through the configured scheme list
|
|
7
|
+
(system, light, dark), applying color-scheme and data-color-scheme
|
|
8
|
+
to the target element. Updates the host's icon and label attributes
|
|
9
|
+
to reflect the current scheme. Optionally persists the selection
|
|
10
|
+
to localStorage and reacts to system preference changes.
|
|
11
|
+
config:
|
|
12
|
+
- name: scheme
|
|
13
|
+
type: string
|
|
14
|
+
default: "system"
|
|
15
|
+
description: Initial scheme ('system' | 'light' | 'dark').
|
|
16
|
+
- name: schemes
|
|
17
|
+
type: string
|
|
18
|
+
default: "system,light,dark"
|
|
19
|
+
description: Comma-separated list of available schemes.
|
|
20
|
+
- name: target
|
|
21
|
+
type: string
|
|
22
|
+
default: "document"
|
|
23
|
+
description: CSS selector or 'document' for the target element.
|
|
24
|
+
- name: persist
|
|
25
|
+
type: string
|
|
26
|
+
default: "false"
|
|
27
|
+
description: Persist selection to localStorage ('true' | 'false').
|
|
28
|
+
events:
|
|
29
|
+
- name: scheme-change
|
|
30
|
+
description: Fires on scheme change, detail contains scheme string.
|
|
31
|
+
exposes:
|
|
32
|
+
- name: data-toggle-scheme-scheme
|
|
33
|
+
description: Current scheme value ('system' | 'light' | 'dark').
|
|
34
|
+
examples:
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-button traits="toggle-scheme">Theme</aui-button>
|
|
37
|
+
description: Basic color scheme toggle.
|
|
38
|
+
- html: |
|
|
39
|
+
<aui-button traits="{ trait: 'toggle-scheme', persist: 'true' }">Theme</aui-button>
|
|
40
|
+
description: Persists the selected scheme across sessions.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: toggle-state
|
|
2
|
+
type: trait
|
|
3
|
+
category: state
|
|
4
|
+
summary: Generic boolean toggle that flips on press and exposes active state.
|
|
5
|
+
description: >
|
|
6
|
+
Maintains a reactive boolean state that toggles on each press event.
|
|
7
|
+
Exposes the active state as a data attribute and sets aria-pressed
|
|
8
|
+
for accessibility. Emits a toggle event with the new active value.
|
|
9
|
+
config:
|
|
10
|
+
- name: active
|
|
11
|
+
type: string
|
|
12
|
+
default: "false"
|
|
13
|
+
description: Initial active state ('true' or 'false').
|
|
14
|
+
events:
|
|
15
|
+
- name: toggle
|
|
16
|
+
description: Fires on state change, detail contains { active }.
|
|
17
|
+
exposes:
|
|
18
|
+
- name: data-toggle-state-active
|
|
19
|
+
description: Present when the toggle is active.
|
|
20
|
+
examples:
|
|
21
|
+
- html: |
|
|
22
|
+
<aui-button traits="toggle-state">Toggle me</aui-button>
|
|
23
|
+
description: Basic toggle button.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: tooltip
|
|
2
|
+
type: trait
|
|
3
|
+
category: present
|
|
4
|
+
summary: Shows a tooltip on hover or focus using the Popover API.
|
|
5
|
+
description: >
|
|
6
|
+
Displays a tooltip after a configurable delay when the host is hovered
|
|
7
|
+
or focused. Uses the Popover API (popover=manual) and CSS anchor
|
|
8
|
+
positioning for placement. The tooltip is appended to the host and
|
|
9
|
+
removed on mouseleave or focusout.
|
|
10
|
+
|
|
11
|
+
config:
|
|
12
|
+
- name: text
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
description: The text content displayed inside the tooltip.
|
|
16
|
+
- name: delay
|
|
17
|
+
type: string
|
|
18
|
+
default: "500"
|
|
19
|
+
description: Milliseconds to wait before showing the tooltip.
|
|
20
|
+
- name: position
|
|
21
|
+
type: string
|
|
22
|
+
default: "top"
|
|
23
|
+
description: Tooltip placement relative to the host (top, bottom, left, right).
|
|
24
|
+
|
|
25
|
+
events: []
|
|
26
|
+
|
|
27
|
+
exposes:
|
|
28
|
+
- name: data-tooltip-open
|
|
29
|
+
description: Set to "true" while the tooltip is visible, "false" when hidden.
|
|
30
|
+
|
|
31
|
+
examples:
|
|
32
|
+
- html: |
|
|
33
|
+
<aui-button traits="{ trait: 'tooltip', text: 'Save document' }">Save</aui-button>
|
|
34
|
+
description: Basic tooltip on a button.
|
|
35
|
+
- html: |
|
|
36
|
+
<aui-button traits="{ trait: 'tooltip', text: 'Delete item', position: 'bottom', delay: '200' }">
|
|
37
|
+
Delete
|
|
38
|
+
</aui-button>
|
|
39
|
+
description: Tooltip positioned below with a shorter delay.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: toss
|
|
2
|
+
type: trait
|
|
3
|
+
category: effect
|
|
4
|
+
summary: Physics-based throw that flings the host and springs back to origin.
|
|
5
|
+
description: >
|
|
6
|
+
Samples pointer velocity during movement and, on pointer release,
|
|
7
|
+
applies that velocity as a physics-based fling animation. The host
|
|
8
|
+
translates in the throw direction with configurable friction, then
|
|
9
|
+
springs back toward its original position. Uses requestAnimationFrame
|
|
10
|
+
for smooth animation with no CSS transitions.
|
|
11
|
+
|
|
12
|
+
config:
|
|
13
|
+
- name: friction
|
|
14
|
+
type: string
|
|
15
|
+
default: "0.92"
|
|
16
|
+
description: Velocity decay per frame. Lower values slow faster (0-1 range).
|
|
17
|
+
- name: bounce
|
|
18
|
+
type: string
|
|
19
|
+
default: "0.15"
|
|
20
|
+
description: Spring-back force toward origin per frame (0-1 range).
|
|
21
|
+
- name: max
|
|
22
|
+
type: string
|
|
23
|
+
default: "200"
|
|
24
|
+
description: Maximum displacement in pixels before clamping.
|
|
25
|
+
|
|
26
|
+
events: []
|
|
27
|
+
|
|
28
|
+
exposes:
|
|
29
|
+
- name: data-toss-active
|
|
30
|
+
description: Present while the toss animation is running.
|
|
31
|
+
|
|
32
|
+
examples:
|
|
33
|
+
- html: |
|
|
34
|
+
<aui-card traits="toss">Toss me</aui-card>
|
|
35
|
+
description: Basic toss with default physics.
|
|
36
|
+
- html: |
|
|
37
|
+
<aui-card traits="{ trait: 'toss', friction: '0.90', bounce: '0.2' }">
|
|
38
|
+
Flick me
|
|
39
|
+
</aui-card>
|
|
40
|
+
description: Slightly more damped toss with stronger spring-back.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: trap-focus
|
|
2
|
+
type: trait
|
|
3
|
+
category: focus
|
|
4
|
+
summary: Traps keyboard focus within the host element.
|
|
5
|
+
description: >
|
|
6
|
+
Intercepts Tab and Shift+Tab keydown events to cycle focus through
|
|
7
|
+
the host's focusable children without escaping. Automatically focuses
|
|
8
|
+
the first focusable child on attach. Targets standard focusable elements
|
|
9
|
+
including links, buttons, inputs, selects, textareas, and elements with
|
|
10
|
+
tabindex.
|
|
11
|
+
config: []
|
|
12
|
+
events: []
|
|
13
|
+
exposes: []
|
|
14
|
+
examples:
|
|
15
|
+
- html: |
|
|
16
|
+
<aui-container traits="trap-focus">
|
|
17
|
+
<a href="#">Link</a>
|
|
18
|
+
<span tabindex="0">Focusable</span>
|
|
19
|
+
</aui-container>
|
|
20
|
+
description: Basic focus trap around focusable children.
|