@onereach/ui-components 18.0.1 → 18.0.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/dist/bundled/components/OrTreeV3/index.js +8 -6
- package/dist/bundled/index.js +1 -1
- package/dist/esm/components/or-tree-v3/index.js +9 -6
- package/dist/esm/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue +12 -9
- package/src/components/or-tree-v3/partials/or-tree-node/styles.ts +7 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, unref, onMounted, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, createBlock, withCtx, createVNode, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, Fragment, renderList } from 'vue';
|
|
2
2
|
import { s as script$2 } from '../OrButtonV3-e2d43fe6.js';
|
|
3
3
|
import { s as script$3 } from '../OrIconV3-9807ee48.js';
|
|
4
|
-
import { a as useToggle } from '../OrAutocompleteV3-7bae2c75.js';
|
|
5
4
|
|
|
6
5
|
const TreeNodeRoot = [];
|
|
7
6
|
const TreeNodeItemRoot = [
|
|
@@ -11,12 +10,12 @@ const TreeNodeItemRoot = [
|
|
|
11
10
|
'hover:bg-primary-opacity-0-08', 'dark:hover:bg-primary-opacity-0-08-dark', 'selected:bg-primary-opacity-0-16', 'dark:selected:bg-primary-opacity-0-16-dark', 'selected:hover:bg-primary-opacity-0-16', 'dark:selected:hover:bg-primary-opacity-0-16-dark'];
|
|
12
11
|
const TreeNodeItemRootParentSelected = [
|
|
13
12
|
// Theme
|
|
14
|
-
'bg-primary-opacity-0-08', 'bg-primary-opacity-0-08-dark', 'hover:bg-primary-opacity-0-16', 'dark:hover:bg-primary-opacity-0-16-dark'];
|
|
13
|
+
'bg-primary-opacity-0-08', 'dark:bg-primary-opacity-0-08-dark', 'hover:bg-primary-opacity-0-16', 'dark:hover:bg-primary-opacity-0-16-dark'];
|
|
15
14
|
const TreeNodeDragIndicator = [
|
|
16
15
|
// Layout
|
|
17
16
|
'absolute h-[2px] w-full left-[0px]',
|
|
18
17
|
// Theme
|
|
19
|
-
'bg-primary',
|
|
18
|
+
'bg-primary-hover', 'dark:bg-primary-hover-dark',
|
|
20
19
|
// Interaction
|
|
21
20
|
'pointer-events-none'];
|
|
22
21
|
const TreeNodeDragIndicatorPosition = {
|
|
@@ -27,7 +26,7 @@ const TreeNodeDragIndicatorPosition = {
|
|
|
27
26
|
// Layout
|
|
28
27
|
'top-[-1px]', 'left-[0px]', 'w-full', '!h-[calc(100%+2px)]',
|
|
29
28
|
// Theme
|
|
30
|
-
'bg-transparent', 'border-1', 'border-primary-hover', 'dark:border-primary-hover-dark'],
|
|
29
|
+
'bg-transparent', 'dark:bg-transparent', 'border-1', 'border-primary-hover', 'dark:border-primary-hover-dark'],
|
|
31
30
|
bottom: [
|
|
32
31
|
// Layout
|
|
33
32
|
'bottom-[-1px]']
|
|
@@ -36,7 +35,7 @@ const ChildrenDragoverStyles = [
|
|
|
36
35
|
// Layout
|
|
37
36
|
'top-[-1px]', 'left-[0px]', 'w-full', '!h-[calc(100%+2px)]',
|
|
38
37
|
// Theme
|
|
39
|
-
'bg-transparent', 'border-1', 'border-primary-hover', 'dark:border-primary-hover-dark'];
|
|
38
|
+
'bg-transparent', 'dark:bg-transparent', 'border-1', 'border-primary-hover', 'dark:border-primary-hover-dark'];
|
|
40
39
|
|
|
41
40
|
var TreeNodeDropPosition;
|
|
42
41
|
(function (TreeNodeDropPosition) {
|
|
@@ -119,7 +118,10 @@ var script$1 = defineComponent({
|
|
|
119
118
|
const isDrag = ref(false);
|
|
120
119
|
const dragOverPosition = ref('top');
|
|
121
120
|
const hasChildren = computed(() => !!props.node.children && props.node.children.length > 0);
|
|
122
|
-
const
|
|
121
|
+
const isOpen = ref(props.expanded);
|
|
122
|
+
const setIsOpen = value => {
|
|
123
|
+
isOpen.value = value;
|
|
124
|
+
};
|
|
123
125
|
const hasCollapseTrigger = computed(() => props.node.collapsible || hasChildren.value);
|
|
124
126
|
const isLeaf = computed(() => !hasChildren.value);
|
|
125
127
|
const canDrag = computed(() => props.draggable !== false && props.node.draggable !== false);
|