@threadlabs/looma 0.23.9 → 0.23.11
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/components/ui-combobox/ui-combobox.html +6 -0
- package/components/ui-combobox/ui-combobox.js +17 -1
- package/components/ui-disclosure/ui-disclosure.html +2 -4
- package/components/ui-tree/ui-tree.html +4 -0
- package/components/ui-tree/ui-tree.js +32 -6
- package/components/ui-tree-item/ui-tree-item.html +21 -8
- package/components/ui-tree-item/ui-tree-item.js +3 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-disclosure.css +0 -3
- package/styles/ui-tree-item.css +12 -4
- package/vanilla/UiCombobox.d.ts +2 -0
- package/vanilla/UiCombobox.js +1 -1
- package/vanilla/UiTree.d.ts +1 -0
- package/vanilla/UiTree.js +1 -1
- package/vanilla/UiTreeItem.js +25 -15
- package/vue/UiCombobox.d.ts +18 -0
- package/vue/UiCombobox.vue +39 -0
- package/vue/UiDisclosure.vue +1 -5
- package/vue/UiTree.d.ts +9 -0
- package/vue/UiTree.vue +31 -1
- package/vue/UiTreeItem.d.ts +3 -3
- package/vue/UiTreeItem.vue +55 -8
- package/vue/chunks/UiCombobox.js +46 -1
- package/vue/chunks/UiDisclosure.js +2 -2
- package/vue/chunks/UiTree.js +24 -1
- package/vue/chunks/UiTreeItem.js +39 -8
- package/vue/components.css +181 -178
package/vanilla/UiTree.js
CHANGED
|
@@ -3,7 +3,7 @@ import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
|
3
3
|
import * as controller from "../components/ui-tree/ui-tree.js";
|
|
4
4
|
import "../styles/ui-tree.css";
|
|
5
5
|
|
|
6
|
-
const definition = {...{"contract":{"tag":"ui-tree","props":{"density":{"type":{"kind":"terminal","name":"keyword"},"values":["comfortable","compact"],"required":false,"target":{"attribute":"density"},"default":"comfortable"},"hoverExpandDelay":{"type":"number","required":false,"target":{"attribute":"hoverexpanddelay"},"default":700},"label":{"type":"string","required":false,"target":{"attribute":"label"},"default":"Tree"},"marquee":{"type":"boolean","required":false,"target":{"attribute":"marquee"},"default":false},"maxDepth":{"type":"number","required":false,"target":{"attribute":"maxdepth"},"default":0},"selection":{"type":{"kind":"terminal","name":"keyword"},"values":["none","single","multiple"],"required":false,"target":{"attribute":"selection"},"default":"none"}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"tree"}],"children":[{"kind":"slot"}]},"declarations":[{"kind":"event","name":"reorder","type":"object","shape":{"kind":"object","fields":[{"name":"sourceId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"position","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["before","inside","after"]},"optional":false},{"name":"sourceType","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetType","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"sourceScope","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetScope","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"reorder-rejected","type":"object","shape":{"kind":"object","fields":[{"name":"sourceId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"position","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["before","inside","after"]},"optional":false},{"name":"reason","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["max-depth"]},"optional":false},{"name":"maxDepth","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"resultingDepth","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"activate","type":"object","shape":{"kind":"object","fields":[{"name":"id","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"select","type":"object","shape":{"kind":"object","fields":[{"name":"ids","type":{"kind":"list","item":{"kind":"terminal","name":"string"}},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
6
|
+
const definition = {...{"contract":{"tag":"ui-tree","props":{"density":{"type":{"kind":"terminal","name":"keyword"},"values":["comfortable","compact"],"required":false,"target":{"attribute":"density"},"default":"comfortable"},"hoverExpandDelay":{"type":"number","required":false,"target":{"attribute":"hoverexpanddelay"},"default":700},"label":{"type":"string","required":false,"target":{"attribute":"label"},"default":"Tree"},"marquee":{"type":"boolean","required":false,"target":{"attribute":"marquee"},"default":false},"maxDepth":{"type":"number","required":false,"target":{"attribute":"maxdepth"},"default":0},"moveActivation":{"type":{"kind":"terminal","name":"keyword"},"values":["click","keyboard-touch"],"required":false,"target":{"attribute":"moveactivation"},"default":"click"},"selection":{"type":{"kind":"terminal","name":"keyword"},"values":["none","single","multiple"],"required":false,"target":{"attribute":"selection"},"default":"none"}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"tree"}],"children":[{"kind":"slot"}]},"declarations":[{"kind":"event","name":"reorder","type":"object","shape":{"kind":"object","fields":[{"name":"sourceId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"position","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["before","inside","after"]},"optional":false},{"name":"sourceType","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetType","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"sourceScope","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetScope","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"reorder-rejected","type":"object","shape":{"kind":"object","fields":[{"name":"sourceId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"targetId","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"position","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["before","inside","after"]},"optional":false},{"name":"reason","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["max-depth"]},"optional":false},{"name":"maxDepth","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"resultingDepth","type":{"kind":"terminal","name":"integer"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"activate","type":"object","shape":{"kind":"object","fields":[{"name":"id","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false},{"kind":"event","name":"select","type":"object","shape":{"kind":"object","fields":[{"name":"ids","type":{"kind":"list","item":{"kind":"terminal","name":"string"}},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":true,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
7
7
|
|
|
8
8
|
export function createUiTree(options = {}) {
|
|
9
9
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
package/vanilla/UiTreeItem.js
CHANGED
|
@@ -3,7 +3,7 @@ import { manageComponentLifecycle } from "@nextwebwg/html-next/runtime";
|
|
|
3
3
|
import * as controller from "../components/ui-tree-item/ui-tree-item.js";
|
|
4
4
|
import "../styles/ui-tree-item.css";
|
|
5
5
|
|
|
6
|
-
const definition = {...{"contract":{"tag":"ui-tree-item","props":{"accepts":{"type":"string","required":false,"target":{"attribute":"data-accepts"},"default":""},"container":{"type":"boolean","required":false,"target":{"attribute":"container"},"default":false},"disabled":{"type":"boolean","required":false,"target":{"attribute":"aria-disabled"},"default":false},"dragType":{"type":"string","required":false,"target":{"attribute":"data-drag-type"},"default":"item"},"dropDepth":{"type":"number","required":false,"target":{"attribute":"data-drop-depth"}},"dropScope":{"type":"string","required":false,"target":{"attribute":"data-drop-scope"},"default":""},"expanded":{"type":"boolean","required":false,"target":{"attribute":"expanded"},"default":false},"itemId":{"type":"string","required":false,"target":{"attribute":"data-item-id"},"default":""},"label":{"type":"string","required":false,"target":{"attribute":"aria-label"},"default":""},"lazy":{"type":"boolean","required":false,"target":{"attribute":"lazy"},"default":false},"marquee":{"type":"boolean","required":false,"target":{"attribute":"marquee"},"default":false},"selected":{"type":"boolean","required":false,"target":{"attribute":"aria-selected"},"default":false},"sortable":{"type":"boolean","required":false,"target":{"attribute":"sortable"},"default":false},"subtreeDepth":{"type":"number","required":false,"target":{"attribute":"data-subtree-depth"}}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"treeitem"},{"kind":"attribute","name":"aria-label","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}},{"kind":"attribute","name":"aria-level","expression":"structuralLevel","expressionPlan":{"source":"structuralLevel","ast":{"kind":"id","name":"structuralLevel"},"dependencies":["structuralLevel"]}},{"kind":"attribute","name":"aria-selected","expression":"selected","expressionPlan":{"source":"selected","ast":{"kind":"id","name":"selected"},"dependencies":["selected"]}},{"kind":"attribute","name":"aria-disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"data-item-id","expression":"itemId","expressionPlan":{"source":"itemId","ast":{"kind":"id","name":"itemId"},"dependencies":["itemId"]}},{"kind":"attribute","name":"data-drag-type","expression":"dragType","expressionPlan":{"source":"dragType","ast":{"kind":"id","name":"dragType"},"dependencies":["dragType"]}},{"kind":"attribute","name":"data-drop-scope","expression":"dropScope","expressionPlan":{"source":"dropScope","ast":{"kind":"id","name":"dropScope"},"dependencies":["dropScope"]}},{"kind":"attribute","name":"data-accepts","expression":"accepts","expressionPlan":{"source":"accepts","ast":{"kind":"id","name":"accepts"},"dependencies":["accepts"]}},{"kind":"attribute","name":"data-drop-depth","expression":"dropDepth","expressionPlan":{"source":"dropDepth","ast":{"kind":"id","name":"dropDepth"},"dependencies":["dropDepth"]}},{"kind":"attribute","name":"data-subtree-depth","expression":"subtreeDepth","expressionPlan":{"source":"subtreeDepth","ast":{"kind":"id","name":"subtreeDepth"},"dependencies":["subtreeDepth"]}}],"children":[{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"row"}],"children":[{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"drag-handle"},{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"draggable","value":"true"},{"kind":"attribute","name":"aria-label","expression":"format('Drag %s to reorder', label)","expressionPlan":{"source":"format('Drag %s to reorder', label)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"Drag %s to reorder"},{"kind":"id","name":"label"}]},"dependencies":["label"]}}],"children":[{"kind":"element","name":"svg","attributes":[{"kind":"literal","name":"aria-hidden","value":"true"},{"kind":"literal","name":"focusable","value":"false"},{"kind":"literal","name":"viewBox","value":"0 0 24 24"},{"kind":"literal","name":"fill","value":"none"},{"kind":"literal","name":"stroke","value":"currentColor"},{"kind":"literal","name":"stroke-width","value":"2"},{"kind":"literal","name":"stroke-linecap","value":"round"},{"kind":"literal","name":"stroke-linejoin","value":"round"}],"children":[{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"12"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"5"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"19"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"12"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"5"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"19"},{"kind":"literal","name":"r","value":"1"}],"children":[]}]}],"flow":{"kind":"if","test":"sortable and not disabled","testPlan":{"source":"sortable and not disabled","ast":{"kind":"binary","op":"and","left":{"kind":"id","name":"sortable"},"right":{"kind":"unary","op":"not","operand":{"kind":"id","name":"disabled"}}},"dependencies":["disabled","sortable"]}},"ref":"dragHandle"},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"disclosure"},{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"hidden","expression":"not isContainer","expressionPlan":{"source":"not isContainer","ast":{"kind":"unary","op":"not","operand":{"kind":"id","name":"isContainer"}},"dependencies":["isContainer"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"disclosure-icon"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"ref":"disclosure"},{"kind":"element","name":"label","attributes":[{"kind":"literal","name":"class","value":"selection-hit"}],"children":[{"kind":"element","name":"input","attributes":[{"kind":"literal","name":"class","value":"selection-checkbox"},{"kind":"literal","name":"type","value":"checkbox"},{"kind":"literal","name":"tabindex","value":"-1"},{"kind":"attribute","name":"checked","expression":"selected","expressionPlan":{"source":"selected","ast":{"kind":"id","name":"selected"},"dependencies":["selected"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-label","expression":"format('Select %s', label)","expressionPlan":{"source":"format('Select %s', label)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"Select %s"},{"kind":"id","name":"label"}]},"dependencies":["label"]}}],"children":[]}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"leading"}],"children":[{"kind":"slot","fallback":[],"name":"leading"}],"ref":"leading"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label"}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label-text"}],"children":[{"kind":"slot","fallback":[{"kind":"element","name":"template","attributes":[{"kind":"directive","name":"value","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[]}],"name":"label"}],"ref":"labelText"}],"ref":"label"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"actions"}],"children":[{"kind":"slot","fallback":[],"name":"actions"}],"ref":"actions"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"drop-indicator row-drop-indicator"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"ref":"row"},{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"children"},{"kind":"literal","name":"role","value":"group"},{"kind":"attribute","name":"hidden","expression":"not (isContainer and internalExpanded)","expressionPlan":{"source":"not (isContainer and internalExpanded)","ast":{"kind":"unary","op":"not","operand":{"kind":"binary","op":"and","left":{"kind":"id","name":"isContainer"},"right":{"kind":"id","name":"internalExpanded"}}},"dependencies":["internalExpanded","isContainer"]}}],"children":[{"kind":"slot"}],"ref":"children"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"drop-indicator subtree-drop-indicator"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}]},"declarations":[{"kind":"state","name":"internalExpanded","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"structuralLevel","type":"integer","value":"1","expression":{"source":"1","ast":{"kind":"literal","value":1},"dependencies":[]}},{"kind":"state","name":"tabStop","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"isContainer","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"event","name":"expand","type":"object","shape":{"kind":"object","fields":[{"name":"id","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"expanded","type":{"kind":"terminal","name":"boolean"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":false,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
6
|
+
const definition = {...{"contract":{"tag":"ui-tree-item","props":{"accepts":{"type":"string","required":false,"target":{"attribute":"data-accepts"},"default":""},"container":{"type":"boolean","required":false,"target":{"attribute":"container"},"default":false},"disabled":{"type":"boolean","required":false,"target":{"attribute":"aria-disabled"},"default":false},"dragType":{"type":"string","required":false,"target":{"attribute":"data-drag-type"},"default":"item"},"dropDepth":{"type":"number","required":false,"target":{"attribute":"data-drop-depth"}},"dropScope":{"type":"string","required":false,"target":{"attribute":"data-drop-scope"},"default":""},"expanded":{"type":"boolean","required":false,"target":{"attribute":"expanded"},"default":false},"itemId":{"type":"string","required":false,"target":{"attribute":"data-item-id"},"default":""},"label":{"type":"string","required":false,"target":{"attribute":"aria-label"},"default":""},"lazy":{"type":"boolean","required":false,"target":{"attribute":"lazy"},"default":false},"marquee":{"type":"boolean","required":false,"target":{"attribute":"marquee"},"default":false},"selected":{"type":"boolean","required":false,"target":{"attribute":"aria-selected"},"default":false},"sortable":{"type":"boolean","required":false,"target":{"attribute":"sortable"},"default":false},"subtreeDepth":{"type":"number","required":false,"target":{"attribute":"data-subtree-depth"}}}},"template":{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"role","value":"treeitem"},{"kind":"attribute","name":"aria-label","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}},{"kind":"attribute","name":"aria-level","expression":"structuralLevel","expressionPlan":{"source":"structuralLevel","ast":{"kind":"id","name":"structuralLevel"},"dependencies":["structuralLevel"]}},{"kind":"attribute","name":"aria-selected","expression":"selected","expressionPlan":{"source":"selected","ast":{"kind":"id","name":"selected"},"dependencies":["selected"]}},{"kind":"attribute","name":"aria-disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"data-item-id","expression":"itemId","expressionPlan":{"source":"itemId","ast":{"kind":"id","name":"itemId"},"dependencies":["itemId"]}},{"kind":"attribute","name":"data-drag-type","expression":"dragType","expressionPlan":{"source":"dragType","ast":{"kind":"id","name":"dragType"},"dependencies":["dragType"]}},{"kind":"attribute","name":"data-drop-scope","expression":"dropScope","expressionPlan":{"source":"dropScope","ast":{"kind":"id","name":"dropScope"},"dependencies":["dropScope"]}},{"kind":"attribute","name":"data-accepts","expression":"accepts","expressionPlan":{"source":"accepts","ast":{"kind":"id","name":"accepts"},"dependencies":["accepts"]}},{"kind":"attribute","name":"data-drop-depth","expression":"dropDepth","expressionPlan":{"source":"dropDepth","ast":{"kind":"id","name":"dropDepth"},"dependencies":["dropDepth"]}},{"kind":"attribute","name":"data-subtree-depth","expression":"subtreeDepth","expressionPlan":{"source":"subtreeDepth","ast":{"kind":"id","name":"subtreeDepth"},"dependencies":["subtreeDepth"]}}],"children":[{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"row"}],"children":[{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"drag-handle"},{"kind":"literal","name":"type","value":"button"},{"kind":"literal","name":"draggable","value":"true"},{"kind":"attribute","name":"aria-label","expression":"{ true: format('Cancel moving %s', label), false: format('Drag %s to reorder', label) }[format('%s', moving)]","expressionPlan":{"source":"{ true: format('Cancel moving %s', label), false: format('Drag %s to reorder', label) }[format('%s', moving)]","ast":{"kind":"index","object":{"kind":"object","pairs":[{"key":"true","value":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"Cancel moving %s"},{"kind":"id","name":"label"}]}},{"key":"false","value":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"Drag %s to reorder"},{"kind":"id","name":"label"}]}}]},"index":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"%s"},{"kind":"id","name":"moving"}]}},"dependencies":["label","moving"]}}],"children":[{"kind":"element","name":"svg","attributes":[{"kind":"literal","name":"aria-hidden","value":"true"},{"kind":"literal","name":"focusable","value":"false"},{"kind":"literal","name":"viewBox","value":"0 0 24 24"},{"kind":"literal","name":"fill","value":"none"},{"kind":"literal","name":"stroke","value":"currentColor"},{"kind":"literal","name":"stroke-width","value":"2"},{"kind":"literal","name":"stroke-linecap","value":"round"},{"kind":"literal","name":"stroke-linejoin","value":"round"}],"children":[{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"12"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"5"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"9"},{"kind":"literal","name":"cy","value":"19"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"12"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"5"},{"kind":"literal","name":"r","value":"1"}],"children":[]},{"kind":"element","name":"circle","attributes":[{"kind":"literal","name":"cx","value":"15"},{"kind":"literal","name":"cy","value":"19"},{"kind":"literal","name":"r","value":"1"}],"children":[]}]}],"flow":{"kind":"if","test":"sortable and not disabled","testPlan":{"source":"sortable and not disabled","ast":{"kind":"binary","op":"and","left":{"kind":"id","name":"sortable"},"right":{"kind":"unary","op":"not","operand":{"kind":"id","name":"disabled"}}},"dependencies":["disabled","sortable"]}},"ref":"dragHandle"},{"kind":"element","name":"button","attributes":[{"kind":"literal","name":"class","value":"disclosure"},{"kind":"literal","name":"type","value":"button"},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"hidden","expression":"not isContainer","expressionPlan":{"source":"not isContainer","ast":{"kind":"unary","op":"not","operand":{"kind":"id","name":"isContainer"}},"dependencies":["isContainer"]}}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"disclosure-icon"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"ref":"disclosure"},{"kind":"element","name":"label","attributes":[{"kind":"literal","name":"class","value":"selection-hit"}],"children":[{"kind":"element","name":"input","attributes":[{"kind":"literal","name":"class","value":"selection-checkbox"},{"kind":"literal","name":"type","value":"checkbox"},{"kind":"literal","name":"tabindex","value":"-1"},{"kind":"attribute","name":"checked","expression":"selected","expressionPlan":{"source":"selected","ast":{"kind":"id","name":"selected"},"dependencies":["selected"]}},{"kind":"attribute","name":"disabled","expression":"disabled","expressionPlan":{"source":"disabled","ast":{"kind":"id","name":"disabled"},"dependencies":["disabled"]}},{"kind":"attribute","name":"aria-label","expression":"format('Select %s', label)","expressionPlan":{"source":"format('Select %s', label)","ast":{"kind":"call","fn":"format","args":[{"kind":"literal","value":"Select %s"},{"kind":"id","name":"label"}]},"dependencies":["label"]}}],"children":[]}]},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"leading"}],"children":[{"kind":"slot","fallback":[],"name":"leading"}],"ref":"leading"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label"}],"children":[{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"label-text"}],"children":[{"kind":"slot","fallback":[{"kind":"element","name":"template","attributes":[{"kind":"directive","name":"value","expression":"label","expressionPlan":{"source":"label","ast":{"kind":"id","name":"label"},"dependencies":["label"]}}],"children":[]}],"name":"label"}],"ref":"labelText"}],"ref":"label"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"actions"}],"children":[{"kind":"element","name":"ui-button","attributes":[{"kind":"literal","name":"data-tree-cancel-move","value":""},{"kind":"literal","name":"variant","value":"ghost"},{"kind":"literal","name":"tone","value":"neutral"},{"kind":"literal","name":"size","value":"sm"},{"kind":"literal","name":"aria-label","value":"Cancel move"}],"children":[{"kind":"text","value":"Cancel"}],"flow":{"kind":"if","test":"moving","testPlan":{"source":"moving","ast":{"kind":"id","name":"moving"},"dependencies":["moving"]}}},{"kind":"element","name":"span","attributes":[],"children":[{"kind":"slot","fallback":[],"name":"actions"}],"flow":{"kind":"else"}}],"ref":"actions"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"drop-indicator row-drop-indicator"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}],"ref":"row"},{"kind":"element","name":"div","attributes":[{"kind":"literal","name":"class","value":"children"},{"kind":"literal","name":"role","value":"group"},{"kind":"attribute","name":"hidden","expression":"not (isContainer and internalExpanded)","expressionPlan":{"source":"not (isContainer and internalExpanded)","ast":{"kind":"unary","op":"not","operand":{"kind":"binary","op":"and","left":{"kind":"id","name":"isContainer"},"right":{"kind":"id","name":"internalExpanded"}}},"dependencies":["internalExpanded","isContainer"]}}],"children":[{"kind":"slot"}],"ref":"children"},{"kind":"element","name":"span","attributes":[{"kind":"literal","name":"class","value":"drop-indicator subtree-drop-indicator"},{"kind":"literal","name":"aria-hidden","value":"true"}],"children":[]}]},"declarations":[{"kind":"state","name":"internalExpanded","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"structuralLevel","type":"integer","value":"1","expression":{"source":"1","ast":{"kind":"literal","value":1},"dependencies":[]}},{"kind":"state","name":"tabStop","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"isContainer","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"state","name":"moving","type":"boolean","value":"false","expression":{"source":"false","ast":{"kind":"literal","value":false},"dependencies":[]}},{"kind":"event","name":"expand","type":"object","shape":{"kind":"object","fields":[{"name":"id","type":{"kind":"terminal","name":"string"},"optional":false},{"name":"expanded","type":{"kind":"terminal","name":"boolean"},"optional":false},{"name":"trigger","type":{"kind":"constrained","base":{"kind":"terminal","name":"keyword"},"values":["keyboard","pointer","programmatic"]},"optional":false}],"open":false},"bubbles":false,"composed":true,"cancelable":false}],"root":{"kind":"native","element":"div","choices":["div"]}},source:{file:import.meta.url},css:""};
|
|
7
7
|
|
|
8
8
|
export function createUiTreeItem(options = {}) {
|
|
9
9
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
@@ -145,38 +145,48 @@ export function createUiTreeItem(options = {}) {
|
|
|
145
145
|
element0.append(element14);
|
|
146
146
|
const element17 = document.createElement("span");
|
|
147
147
|
element17.setAttribute("class", "actions");
|
|
148
|
+
const element18 = document.createElement("ui-button");
|
|
149
|
+
element18.setAttribute("data-tree-cancel-move", "");
|
|
150
|
+
element18.setAttribute("variant", "ghost");
|
|
151
|
+
element18.setAttribute("tone", "neutral");
|
|
152
|
+
element18.setAttribute("size", "sm");
|
|
153
|
+
element18.setAttribute("aria-label", "Cancel move");
|
|
154
|
+
element18.append("Cancel");
|
|
155
|
+
element17.append(element18);
|
|
156
|
+
const element19 = document.createElement("span");
|
|
148
157
|
if (slots["actions"] ?? [].length > 0) {
|
|
149
158
|
for (const child of slots["actions"] ?? []) {
|
|
150
159
|
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
151
160
|
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
152
161
|
projected.push([node, "actions"]);
|
|
153
|
-
|
|
162
|
+
element19.append(node);
|
|
154
163
|
}
|
|
155
164
|
} else {
|
|
156
165
|
}
|
|
166
|
+
element17.append(element19);
|
|
157
167
|
element0.append(element17);
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
element0.append(
|
|
168
|
+
const element20 = document.createElement("span");
|
|
169
|
+
element20.setAttribute("class", "drop-indicator row-drop-indicator");
|
|
170
|
+
element20.setAttribute("aria-hidden", "true");
|
|
171
|
+
element0.append(element20);
|
|
162
172
|
element.append(element0);
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
173
|
+
const element21 = document.createElement("div");
|
|
174
|
+
element21.setAttribute("class", "children");
|
|
175
|
+
element21.setAttribute("role", "group");
|
|
166
176
|
if (children.length > 0) {
|
|
167
177
|
for (const child of children) {
|
|
168
178
|
const node = typeof child === "string" ? document.createTextNode(child) : child;
|
|
169
179
|
if (node.nodeType === 1) node.setAttribute("data-slotted", "");
|
|
170
180
|
projected.push([node, ""]);
|
|
171
|
-
|
|
181
|
+
element21.append(node);
|
|
172
182
|
}
|
|
173
183
|
} else {
|
|
174
184
|
}
|
|
175
|
-
element.append(
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
element.append(
|
|
185
|
+
element.append(element21);
|
|
186
|
+
const element22 = document.createElement("span");
|
|
187
|
+
element22.setAttribute("class", "drop-indicator subtree-drop-indicator");
|
|
188
|
+
element22.setAttribute("aria-hidden", "true");
|
|
189
|
+
element.append(element22);
|
|
180
190
|
manageComponentLifecycle(element, definition, { props: componentProps, projected,
|
|
181
191
|
controller,
|
|
182
192
|
});
|
package/vue/UiCombobox.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
22
22
|
type: PropType<boolean | null>;
|
|
23
23
|
default: boolean;
|
|
24
24
|
};
|
|
25
|
+
autoHighlight: {
|
|
26
|
+
type: PropType<"none" | "single" | null>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
25
29
|
clearable: {
|
|
26
30
|
type: PropType<boolean | null>;
|
|
27
31
|
default: boolean;
|
|
@@ -102,6 +106,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
102
106
|
type: PropType<boolean | null>;
|
|
103
107
|
default: boolean;
|
|
104
108
|
};
|
|
109
|
+
selectOnTab: {
|
|
110
|
+
type: PropType<boolean | null>;
|
|
111
|
+
default: boolean;
|
|
112
|
+
};
|
|
105
113
|
selectedValues: {
|
|
106
114
|
type: PropType<readonly (string)[] | null>;
|
|
107
115
|
default: null;
|
|
@@ -275,6 +283,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
275
283
|
type: PropType<boolean | null>;
|
|
276
284
|
default: boolean;
|
|
277
285
|
};
|
|
286
|
+
autoHighlight: {
|
|
287
|
+
type: PropType<"none" | "single" | null>;
|
|
288
|
+
default: string;
|
|
289
|
+
};
|
|
278
290
|
clearable: {
|
|
279
291
|
type: PropType<boolean | null>;
|
|
280
292
|
default: boolean;
|
|
@@ -355,6 +367,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
355
367
|
type: PropType<boolean | null>;
|
|
356
368
|
default: boolean;
|
|
357
369
|
};
|
|
370
|
+
selectOnTab: {
|
|
371
|
+
type: PropType<boolean | null>;
|
|
372
|
+
default: boolean;
|
|
373
|
+
};
|
|
358
374
|
selectedValues: {
|
|
359
375
|
type: PropType<readonly (string)[] | null>;
|
|
360
376
|
default: null;
|
|
@@ -548,8 +564,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
548
564
|
readonly: boolean | null;
|
|
549
565
|
allowCreate: boolean | null;
|
|
550
566
|
allowFreeText: boolean | null;
|
|
567
|
+
autoHighlight: "none" | "single" | null;
|
|
551
568
|
labelVisibility: "visible" | "sr-only" | null;
|
|
552
569
|
openOnFocus: boolean | null;
|
|
570
|
+
selectOnTab: boolean | null;
|
|
553
571
|
selectedValues: readonly string[] | null;
|
|
554
572
|
tokenSeparators: readonly string[] | null;
|
|
555
573
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/vue/UiCombobox.vue
CHANGED
|
@@ -36,6 +36,15 @@ const propValidityContract = {
|
|
|
36
36
|
description: 'Allows values that do not match an authored option.',
|
|
37
37
|
default: false,
|
|
38
38
|
},
|
|
39
|
+
autoHighlight: {
|
|
40
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
41
|
+
required: false,
|
|
42
|
+
target: { attribute: 'autohighlight' },
|
|
43
|
+
description:
|
|
44
|
+
'single highlights the only enabled authored suggestion while typing. Ambiguous results and an empty query stay unhighlighted. none preserves manual\n highlighting with the arrow keys.',
|
|
45
|
+
values: ['none', 'single'],
|
|
46
|
+
default: 'none',
|
|
47
|
+
},
|
|
39
48
|
clearable: {
|
|
40
49
|
type: { kind: 'terminal', name: 'boolean' },
|
|
41
50
|
required: false,
|
|
@@ -206,6 +215,14 @@ const propValidityContract = {
|
|
|
206
215
|
'Requires a value: adds an asterisk to the label, marks the input required for native form validation, and makes validation report "A value is required."\n when the field is left empty. In multiple mode a chosen item satisfies it, whatever is left in the input.',
|
|
207
216
|
default: false,
|
|
208
217
|
},
|
|
218
|
+
selectOnTab: {
|
|
219
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
220
|
+
required: false,
|
|
221
|
+
target: { attribute: 'selectontab' },
|
|
222
|
+
description:
|
|
223
|
+
'Commits a highlighted authored suggestion on forward Tab, then lets focus advance normally. In multiple mode a selected suggestion is retained without\n duplication or removal. Shift+Tab does not commit, and Tab never chooses the create offer.',
|
|
224
|
+
default: false,
|
|
225
|
+
},
|
|
209
226
|
selectedValues: {
|
|
210
227
|
type: { kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
211
228
|
required: false,
|
|
@@ -241,6 +258,7 @@ const propValidityContract = {
|
|
|
241
258
|
const props = defineProps({
|
|
242
259
|
allowCreate: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
243
260
|
allowFreeText: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
261
|
+
autoHighlight: { type: null as unknown as PropType<'none' | 'single' | null>, default: 'none' },
|
|
244
262
|
clearable: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
245
263
|
disabled: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
246
264
|
disclosure: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
@@ -278,6 +296,7 @@ const props = defineProps({
|
|
|
278
296
|
query: { type: null as unknown as PropType<string | null>, default: null },
|
|
279
297
|
readonly: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
280
298
|
required: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
299
|
+
selectOnTab: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
281
300
|
selectedValues: { type: null as unknown as PropType<readonly (string)[] | null>, default: null },
|
|
282
301
|
size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null>, default: 'md' },
|
|
283
302
|
tokenSeparators: { type: null as unknown as PropType<readonly (string)[] | null>, default: null },
|
|
@@ -286,6 +305,7 @@ const props = defineProps({
|
|
|
286
305
|
const acceptedProps: Record<string, unknown> = {
|
|
287
306
|
allowCreate: false,
|
|
288
307
|
allowFreeText: false,
|
|
308
|
+
autoHighlight: 'none',
|
|
289
309
|
clearable: false,
|
|
290
310
|
disabled: false,
|
|
291
311
|
disclosure: false,
|
|
@@ -303,6 +323,7 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
303
323
|
query: null,
|
|
304
324
|
readonly: false,
|
|
305
325
|
required: false,
|
|
326
|
+
selectOnTab: false,
|
|
306
327
|
selectedValues: null,
|
|
307
328
|
size: 'md',
|
|
308
329
|
tokenSeparators: null,
|
|
@@ -323,6 +344,13 @@ const checkedProps = computed(() => ({
|
|
|
323
344
|
'allowFreeText',
|
|
324
345
|
acceptedProps,
|
|
325
346
|
) as boolean,
|
|
347
|
+
autoHighlight: checkedProp<'none' | 'single'>(
|
|
348
|
+
props['autoHighlight'],
|
|
349
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
350
|
+
false,
|
|
351
|
+
'autoHighlight',
|
|
352
|
+
acceptedProps,
|
|
353
|
+
) as 'none' | 'single',
|
|
326
354
|
clearable: checkedProp<boolean>(
|
|
327
355
|
props['clearable'],
|
|
328
356
|
{ kind: 'terminal', name: 'boolean' },
|
|
@@ -491,6 +519,13 @@ const checkedProps = computed(() => ({
|
|
|
491
519
|
'required',
|
|
492
520
|
acceptedProps,
|
|
493
521
|
) as boolean,
|
|
522
|
+
selectOnTab: checkedProp<boolean>(
|
|
523
|
+
props['selectOnTab'],
|
|
524
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
525
|
+
false,
|
|
526
|
+
'selectOnTab',
|
|
527
|
+
acceptedProps,
|
|
528
|
+
) as boolean,
|
|
494
529
|
selectedValues: checkedProp<readonly (string)[]>(
|
|
495
530
|
props['selectedValues'],
|
|
496
531
|
{ kind: 'list', item: { kind: 'terminal', name: 'string' } },
|
|
@@ -1271,6 +1306,7 @@ const { host, ready } = useComponentHost(() => import('../components/ui-combobox
|
|
|
1271
1306
|
propNames: [
|
|
1272
1307
|
'allowCreate',
|
|
1273
1308
|
'allowFreeText',
|
|
1309
|
+
'autoHighlight',
|
|
1274
1310
|
'clearable',
|
|
1275
1311
|
'disabled',
|
|
1276
1312
|
'disclosure',
|
|
@@ -1288,6 +1324,7 @@ const { host, ready } = useComponentHost(() => import('../components/ui-combobox
|
|
|
1288
1324
|
'query',
|
|
1289
1325
|
'readonly',
|
|
1290
1326
|
'required',
|
|
1327
|
+
'selectOnTab',
|
|
1291
1328
|
'selectedValues',
|
|
1292
1329
|
'size',
|
|
1293
1330
|
'tokenSeparators',
|
|
@@ -1402,6 +1439,7 @@ function uniqueKeys<T>(
|
|
|
1402
1439
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
1403
1440
|
:data-allow-create="reflectedProp('allowCreate', 'allow-create', checkedProps.allowCreate, undefined, false)"
|
|
1404
1441
|
:data-allow-free-text="reflectedProp('allowFreeText', 'allow-free-text', checkedProps.allowFreeText, undefined, false)"
|
|
1442
|
+
:data-auto-highlight="reflectedProp('autoHighlight', 'auto-highlight', checkedProps.autoHighlight, undefined, false)"
|
|
1405
1443
|
:data-clearable="reflectedProp('clearable', 'clearable', checkedProps.clearable, undefined, false)"
|
|
1406
1444
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
1407
1445
|
:data-disclosure="reflectedProp('disclosure', 'disclosure', checkedProps.disclosure, undefined, false)"
|
|
@@ -1419,6 +1457,7 @@ function uniqueKeys<T>(
|
|
|
1419
1457
|
:data-query="reflectedProp('query', 'query', checkedProps.query, undefined, false)"
|
|
1420
1458
|
:data-readonly="reflectedProp('readonly', 'readonly', checkedProps.readonly, undefined, false)"
|
|
1421
1459
|
:data-required="reflectedProp('required', 'required', checkedProps.required, undefined, false)"
|
|
1460
|
+
:data-select-on-tab="reflectedProp('selectOnTab', 'select-on-tab', checkedProps.selectOnTab, undefined, false)"
|
|
1422
1461
|
:data-selected-values="reflectedProp('selectedValues', 'selected-values', checkedProps.selectedValues, undefined, false)"
|
|
1423
1462
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
1424
1463
|
:data-token-separators="reflectedProp('tokenSeparators', 'token-separators', checkedProps.tokenSeparators, undefined, false)"
|
package/vue/UiDisclosure.vue
CHANGED
|
@@ -78,7 +78,7 @@ const propValidityContract = {
|
|
|
78
78
|
required: false,
|
|
79
79
|
target: { attribute: 'variant' },
|
|
80
80
|
description:
|
|
81
|
-
'Navigation shares icon columns, spacing, type, hover, and corners with Nav Item. Plain retains the standard disclosure treatment.',
|
|
81
|
+
'Navigation shares icon columns, spacing, type, hover, and corners with Nav Item, while keeping expanded sections neutral: opening content is not route\n selection. Plain retains the standard disclosure treatment.',
|
|
82
82
|
values: ['plain', 'navigation'],
|
|
83
83
|
default: 'plain',
|
|
84
84
|
},
|
|
@@ -582,10 +582,6 @@ useComponentHost(() => import('../components/ui-disclosure/ui-disclosure.js'), {
|
|
|
582
582
|
background: var(--ui-nav-hover-surface);
|
|
583
583
|
color: var(--ui-text-primary);
|
|
584
584
|
}
|
|
585
|
-
[data-component~="ui-disclosure"][data-ui-disclosure-state~="variant=navigation"][data-ui-disclosure-state~="internalOpen"]
|
|
586
|
-
.trigger {
|
|
587
|
-
color: var(--ui-selection-text);
|
|
588
|
-
}
|
|
589
585
|
[data-component~="ui-disclosure"][data-ui-disclosure-state~="variant=navigation"]
|
|
590
586
|
:is(.leading, .indicator) {
|
|
591
587
|
inline-size: var(--ui-nav-icon-size);
|
package/vue/UiTree.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
24
24
|
type: PropType<number | null>;
|
|
25
25
|
default: number;
|
|
26
26
|
};
|
|
27
|
+
moveActivation: {
|
|
28
|
+
type: PropType<"click" | "keyboard-touch" | null>;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
27
31
|
selection: {
|
|
28
32
|
type: PropType<"none" | "single" | "multiple" | null>;
|
|
29
33
|
default: string;
|
|
@@ -78,6 +82,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
78
82
|
type: PropType<number | null>;
|
|
79
83
|
default: number;
|
|
80
84
|
};
|
|
85
|
+
moveActivation: {
|
|
86
|
+
type: PropType<"click" | "keyboard-touch" | null>;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
81
89
|
selection: {
|
|
82
90
|
type: PropType<"none" | "single" | "multiple" | null>;
|
|
83
91
|
default: string;
|
|
@@ -118,6 +126,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
118
126
|
density: "comfortable" | "compact" | null;
|
|
119
127
|
hoverExpandDelay: number | null;
|
|
120
128
|
maxDepth: number | null;
|
|
129
|
+
moveActivation: "click" | "keyboard-touch" | null;
|
|
121
130
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
122
131
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
123
132
|
declare const _default: typeof __VLS_export;
|
package/vue/UiTree.vue
CHANGED
|
@@ -49,6 +49,15 @@ const propValidityContract = {
|
|
|
49
49
|
'The deepest level a drag may produce, counting the top level as 1. A drop that would place the dragged item, or any item beneath it, deeper than this is\n refused and reported as reorder-rejected. 0 means no limit.',
|
|
50
50
|
default: 0,
|
|
51
51
|
},
|
|
52
|
+
moveActivation: {
|
|
53
|
+
type: { kind: 'terminal', name: 'keyword' },
|
|
54
|
+
required: false,
|
|
55
|
+
target: { attribute: 'moveactivation' },
|
|
56
|
+
description:
|
|
57
|
+
'Which handle activations start guided moving. click preserves two-click moving with any pointer. keyboard-touch leaves ordinary mouse and pen clicks inert\n while retaining keyboard activation and touch taps. Actual pointer dragging works in either mode. Guided moves show Cancel on the source row; Escape or\n reactivating that source handle also cancels without requesting a reorder.',
|
|
58
|
+
values: ['click', 'keyboard-touch'],
|
|
59
|
+
default: 'click',
|
|
60
|
+
},
|
|
52
61
|
selection: {
|
|
53
62
|
type: { kind: 'terminal', name: 'keyword' },
|
|
54
63
|
required: false,
|
|
@@ -69,6 +78,10 @@ const props = defineProps({
|
|
|
69
78
|
label: { type: null as unknown as PropType<string | null>, default: 'Tree' },
|
|
70
79
|
marquee: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
71
80
|
maxDepth: { type: null as unknown as PropType<number | null>, default: 0 },
|
|
81
|
+
moveActivation: {
|
|
82
|
+
type: null as unknown as PropType<'click' | 'keyboard-touch' | null>,
|
|
83
|
+
default: 'click',
|
|
84
|
+
},
|
|
72
85
|
selection: {
|
|
73
86
|
type: null as unknown as PropType<'none' | 'single' | 'multiple' | null>,
|
|
74
87
|
default: 'none',
|
|
@@ -80,6 +93,7 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
80
93
|
label: 'Tree',
|
|
81
94
|
marquee: false,
|
|
82
95
|
maxDepth: 0,
|
|
96
|
+
moveActivation: 'click',
|
|
83
97
|
selection: 'none',
|
|
84
98
|
}
|
|
85
99
|
const checkedProps = computed(() => ({
|
|
@@ -118,6 +132,13 @@ const checkedProps = computed(() => ({
|
|
|
118
132
|
'maxDepth',
|
|
119
133
|
acceptedProps,
|
|
120
134
|
) as number,
|
|
135
|
+
moveActivation: checkedProp<'click' | 'keyboard-touch'>(
|
|
136
|
+
props['moveActivation'],
|
|
137
|
+
{ kind: 'terminal', name: 'keyword' },
|
|
138
|
+
false,
|
|
139
|
+
'moveActivation',
|
|
140
|
+
acceptedProps,
|
|
141
|
+
) as 'click' | 'keyboard-touch',
|
|
121
142
|
selection: checkedProp<'none' | 'single' | 'multiple'>(
|
|
122
143
|
props['selection'],
|
|
123
144
|
{ kind: 'terminal', name: 'keyword' },
|
|
@@ -312,7 +333,15 @@ useComponentHost(() => import('../components/ui-tree/ui-tree.js'), {
|
|
|
312
333
|
? (incoming[name] ?? incoming[kebab] ?? null)
|
|
313
334
|
: null
|
|
314
335
|
},
|
|
315
|
-
propNames: [
|
|
336
|
+
propNames: [
|
|
337
|
+
'density',
|
|
338
|
+
'hoverExpandDelay',
|
|
339
|
+
'label',
|
|
340
|
+
'marquee',
|
|
341
|
+
'maxDepth',
|
|
342
|
+
'moveActivation',
|
|
343
|
+
'selection',
|
|
344
|
+
],
|
|
316
345
|
propValidity: (name: string) =>
|
|
317
346
|
propValidityState({ contract: propValidityContract, values: { ...props } }, name),
|
|
318
347
|
})
|
|
@@ -335,6 +364,7 @@ useComponentHost(() => import('../components/ui-tree/ui-tree.js'), {
|
|
|
335
364
|
:data-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
|
|
336
365
|
:data-marquee="reflectedProp('marquee', 'marquee', checkedProps.marquee, undefined, false)"
|
|
337
366
|
:data-max-depth="reflectedProp('maxDepth', 'max-depth', checkedProps.maxDepth, undefined, false)"
|
|
367
|
+
:data-move-activation="reflectedProp('moveActivation', 'move-activation', checkedProps.moveActivation, undefined, false)"
|
|
338
368
|
:data-selection="reflectedProp('selection', 'selection', checkedProps.selection, undefined, false)"
|
|
339
369
|
:data-ui-tree-state="hostState || undefined"
|
|
340
370
|
ref="root"
|
package/vue/UiTreeItem.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
declare var __VLS_1: {}, __VLS_3: {},
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_11: {}, __VLS_13: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
leading?: (props: typeof __VLS_1) => any;
|
|
5
5
|
} & {
|
|
6
6
|
label?: (props: typeof __VLS_3) => any;
|
|
7
7
|
} & {
|
|
8
|
-
actions?: (props: typeof
|
|
8
|
+
actions?: (props: typeof __VLS_11) => any;
|
|
9
9
|
} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_13) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
13
13
|
accepts: {
|