@unofficialbox/box-open-elements 0.29.0 → 0.29.2
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
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Browse the full catalog on the **[live docs site](https://unofficialbox.github.io/box-open-elements)** — live previews, an events/properties inspector, per-framework code snippets (React / Angular / Vue / Svelte / HTML), and the foundations pages.
|
|
14
14
|
|
|
15
|
-
The library is organized around three layers (see [taxonomy](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
15
|
+
The library is organized around three layers (see [taxonomy](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/taxonomy.md) for the canonical model):
|
|
16
16
|
|
|
17
17
|
- **Foundations** — design decisions as data: tokens, color, typography, iconography, accessibility, theming
|
|
18
18
|
- **Components** — accessible Web Components for single controls, organized by category
|
|
@@ -77,7 +77,7 @@ selection.toggleSelection("1");
|
|
|
77
77
|
- optimized component entrypoints: `@unofficialbox/box-open-elements/<name>`
|
|
78
78
|
- patterns: `@unofficialbox/box-open-elements/patterns/<area>` and `@unofficialbox/box-open-elements/patterns/<area>/<module>`
|
|
79
79
|
|
|
80
|
-
See the versioned [API guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
80
|
+
See the versioned [API guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/api-guidelines.md).
|
|
81
81
|
|
|
82
82
|
## Developing
|
|
83
83
|
|
|
@@ -91,17 +91,17 @@ bun run docs # build + serve the docs site at http://localhost:4600
|
|
|
91
91
|
|
|
92
92
|
## Documentation
|
|
93
93
|
|
|
94
|
-
The versioned docs index is at [docs/README.md](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
95
|
-
|
|
96
|
-
- [Taxonomy](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
97
|
-
- [Architecture](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
98
|
-
- [API Guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
99
|
-
- [Components catalog](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
100
|
-
- [Using with React, Angular, Vue, and Svelte](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
101
|
-
- [Design Tokens](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
102
|
-
- [Content Explorer](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
103
|
-
- [Box Server Integration](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
104
|
-
- [Agent UI guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.
|
|
94
|
+
The versioned docs index is at [docs/README.md](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/README.md). The most important entries:
|
|
95
|
+
|
|
96
|
+
- [Taxonomy](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/taxonomy.md)
|
|
97
|
+
- [Architecture](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/architecture.md)
|
|
98
|
+
- [API Guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/api-guidelines.md)
|
|
99
|
+
- [Components catalog](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/components/catalog.md) and [patterns catalog](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/patterns/catalog.md)
|
|
100
|
+
- [Using with React, Angular, Vue, and Svelte](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/integration/frameworks.md)
|
|
101
|
+
- [Design Tokens](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/foundations/tokens.md)
|
|
102
|
+
- [Content Explorer](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/patterns/content-explorer.md)
|
|
103
|
+
- [Box Server Integration](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/integration/box-server.md)
|
|
104
|
+
- [Agent UI guidelines](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/patterns/agent-ui-guidelines.md), [building blocks](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/patterns/agent-ui.md), and [motion](https://github.com/unofficialbox/box-open-elements/blob/v0.29.2/docs/foundations/motion.md)
|
|
105
105
|
|
|
106
106
|
## Contributing
|
|
107
107
|
|
|
@@ -612,7 +612,11 @@ export class ProcessModeler extends BaseElement {
|
|
|
612
612
|
this.shadowRoot.append(keyboardChooser);
|
|
613
613
|
keyboardPicker.addEventListener('kind-pick', event => {
|
|
614
614
|
const edit = this.keyboardInsertion;
|
|
615
|
-
this.closeKeyboardChooser();
|
|
615
|
+
this.closeKeyboardChooser(true);
|
|
616
|
+
// Keep a stable step focused while the host applies and accepts the edit.
|
|
617
|
+
// World refreshes preserve step focus, including deferred acceptance.
|
|
618
|
+
if (edit?.from)
|
|
619
|
+
this.focusBox(edit.from);
|
|
616
620
|
if (edit)
|
|
617
621
|
this.requestEdit({ ...edit, kind: event.detail.kind });
|
|
618
622
|
});
|
|
@@ -748,7 +752,7 @@ export class ProcessModeler extends BaseElement {
|
|
|
748
752
|
const trigger = document.createElement("button");
|
|
749
753
|
trigger.dataset.command = part === "palette" ? "palette" : "details";
|
|
750
754
|
trigger.textContent = part === "palette" ? "Add" : "Details";
|
|
751
|
-
trigger.setAttribute("aria-label", `Open ${label.toLowerCase()}`);
|
|
755
|
+
trigger.setAttribute("aria-label", part === "palette" ? "Add building blocks" : `Open ${label.toLowerCase()}`);
|
|
752
756
|
trigger.setAttribute('aria-expanded', 'false');
|
|
753
757
|
trigger.onclick = () => this.openDrawer(part);
|
|
754
758
|
toolbar.append(trigger);
|
|
@@ -1854,7 +1858,8 @@ export class ProcessModeler extends BaseElement {
|
|
|
1854
1858
|
anchor.style.cssText = `position:absolute;left:${point.x}px;top:${point.y}px;width:1px;height:1px;pointer-events:none`;
|
|
1855
1859
|
this.shadowRoot.querySelector('[part=world]').append(anchor);
|
|
1856
1860
|
this.transientChooserAnchor = anchor;
|
|
1857
|
-
this.
|
|
1861
|
+
const source = edit.from ? Array.from(this.shadowRoot.querySelectorAll('[data-box-id]')).find(box => box.dataset.boxId === edit.from) : undefined;
|
|
1862
|
+
this.openAnchoredChooser(edit, title, anchor, returnFocus ?? source ?? this.shadowRoot.querySelector('[part=canvas]'));
|
|
1858
1863
|
}
|
|
1859
1864
|
openLineChooser(line, returnFocus) {
|
|
1860
1865
|
const source = this.projection.boxes.find(box => box.id === line.from);
|
|
@@ -2086,10 +2091,20 @@ export class ProcessModeler extends BaseElement {
|
|
|
2086
2091
|
element.append(message);
|
|
2087
2092
|
}
|
|
2088
2093
|
element.addEventListener("keydown", event => {
|
|
2089
|
-
if (event.target
|
|
2094
|
+
if (event.target !== element)
|
|
2095
|
+
return;
|
|
2096
|
+
if (event.key === " ") {
|
|
2090
2097
|
event.preventDefault();
|
|
2091
2098
|
element.click();
|
|
2092
2099
|
}
|
|
2100
|
+
// Let Enter reach the canvas handler after selecting the focused step.
|
|
2101
|
+
// Cancelling it here prevents the editor from opening and taking focus.
|
|
2102
|
+
else if (event.key === "Enter") {
|
|
2103
|
+
// Connection completion consumes Enter; it must not also edit the target.
|
|
2104
|
+
if (this.connecting || this.pendingReattach)
|
|
2105
|
+
event.preventDefault();
|
|
2106
|
+
element.click();
|
|
2107
|
+
}
|
|
2093
2108
|
});
|
|
2094
2109
|
element.addEventListener("click", event => {
|
|
2095
2110
|
if (this.suppressClick && event.detail !== 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unofficialbox/box-open-elements",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.2",
|
|
4
4
|
"description": "Box Open Elements: an open, framework-agnostic design system and web component library for Box-style experiences",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://unofficialbox.github.io/box-open-elements",
|