@onereach/ui-components 8.23.1 → 8.23.2-beta.4138.0
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/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +33 -19
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +6 -6
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +6 -6
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/utils/extractChildrenValues.js +1 -1
- package/dist/bundled/v3/components/{OrCheckboxTreeV3-958d3e64.js → OrCheckboxTreeV3-37cb07f2.js} +39 -21
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/{OrCheckboxGroup-2b5336ae.js → OrCheckboxGroup-5611e13a.js} +1 -1
- package/dist/esm/v2/{OrCheckboxTree-fd61e9d1.js → OrCheckboxTree-ac1a0899.js} +33 -19
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +2 -2
- package/dist/esm/v2/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +6 -6
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +1 -1
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrCheckboxGroup-974b07dc.js → OrCheckboxGroup-b802d08c.js} +1 -1
- package/dist/esm/v3/{OrCheckboxTree-d69f47ad.js → OrCheckboxTree-0bb3e284.js} +39 -21
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +2 -2
- package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +6 -6
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +1 -1
- package/dist/esm/v3/index.js +2 -2
- package/package.json +2 -3
- package/src/components/or-checkbox-tree-v3/OrCheckboxTree.vue +47 -23
|
@@ -30,15 +30,15 @@ var script = defineComponent({
|
|
|
30
30
|
},
|
|
31
31
|
collapsible: {
|
|
32
32
|
type: Boolean,
|
|
33
|
-
default: false
|
|
33
|
+
default: () => false
|
|
34
34
|
},
|
|
35
35
|
disabled: {
|
|
36
36
|
type: Boolean,
|
|
37
|
-
default: false
|
|
37
|
+
default: () => false
|
|
38
38
|
},
|
|
39
39
|
expanded: {
|
|
40
40
|
type: Boolean,
|
|
41
|
-
default: true
|
|
41
|
+
default: () => true
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
emits: ['update:modelValue'],
|
|
@@ -121,46 +121,57 @@ var __vue_render__ = function () {
|
|
|
121
121
|
class: _vm.parentStyles
|
|
122
122
|
}, [_vm.collapsible ? [_c('OrButton', {
|
|
123
123
|
attrs: {
|
|
124
|
-
"variant":
|
|
124
|
+
"variant": 'link',
|
|
125
125
|
"disabled": _vm.disabled
|
|
126
126
|
},
|
|
127
127
|
on: {
|
|
128
|
-
"click": function () {
|
|
128
|
+
"click": function ($event) {
|
|
129
129
|
return _vm.setIsOpen(!_vm.isOpen);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
}, [_c('OrIcon', {
|
|
133
133
|
class: [_vm.isOpen ? 'rotate-[180deg]' : 'rotate-0'],
|
|
134
134
|
attrs: {
|
|
135
|
-
"icon":
|
|
136
|
-
"size":
|
|
135
|
+
"icon": 'arrow_drop_down',
|
|
136
|
+
"size": 'l'
|
|
137
137
|
}
|
|
138
138
|
})], 1)] : _vm._e(), _vm._v(" "), _c('OrCheckbox', {
|
|
139
139
|
attrs: {
|
|
140
|
-
"value": "true",
|
|
141
140
|
"model-value": _vm.isAllChildrenSelected,
|
|
141
|
+
"value": true,
|
|
142
142
|
"indeterminate": _vm.isIntermediate,
|
|
143
|
-
"label": _vm.item.label,
|
|
144
143
|
"disabled": _vm.disabled
|
|
145
144
|
},
|
|
146
145
|
on: {
|
|
147
146
|
"click": _vm.handleParentClick
|
|
148
147
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
}, [_vm._t("checkboxLabel", function () {
|
|
149
|
+
return [_vm._v("\n " + _vm._s(_vm.item.label) + "\n ")];
|
|
150
|
+
}, {
|
|
151
|
+
"item": _vm.item
|
|
152
|
+
})], 2)], 2), _vm._v(" "), _vm.hasChildren && _vm.isOpen ? _c('div', {
|
|
153
|
+
class: [_vm.collapsible ? 'ml-2xl' : 'ml-lg']
|
|
154
154
|
}, _vm._l(_vm.item.children, function (child) {
|
|
155
155
|
return _c('OrCheckboxTree', {
|
|
156
156
|
key: child.value || child.label,
|
|
157
|
-
|
|
157
|
+
class: ['mt-xs'],
|
|
158
158
|
attrs: {
|
|
159
159
|
"item": child,
|
|
160
160
|
"collapsible": child.collapsible,
|
|
161
161
|
"expanded": child.expanded,
|
|
162
162
|
"disabled": _vm.disabled || child.disabled
|
|
163
163
|
},
|
|
164
|
+
scopedSlots: _vm._u([{
|
|
165
|
+
key: "checkboxLabel",
|
|
166
|
+
fn: function (ref) {
|
|
167
|
+
var item = ref.item;
|
|
168
|
+
return [_vm._t("checkboxLabel", function () {
|
|
169
|
+
return [_vm._v("\n " + _vm._s(item.label) + "\n ")];
|
|
170
|
+
}, {
|
|
171
|
+
"item": item
|
|
172
|
+
})];
|
|
173
|
+
}
|
|
174
|
+
}], null, true),
|
|
164
175
|
model: {
|
|
165
176
|
value: _vm.proxyModelValue,
|
|
166
177
|
callback: function ($$v) {
|
|
@@ -171,9 +182,8 @@ var __vue_render__ = function () {
|
|
|
171
182
|
});
|
|
172
183
|
}), 1) : _vm._e()] : [_c('OrCheckbox', {
|
|
173
184
|
attrs: {
|
|
174
|
-
"
|
|
175
|
-
"
|
|
176
|
-
"value": _vm.item.value
|
|
185
|
+
"value": _vm.item.value,
|
|
186
|
+
"disabled": _vm.disabled || _vm.item.disabled
|
|
177
187
|
},
|
|
178
188
|
model: {
|
|
179
189
|
value: _vm.proxyModelValue,
|
|
@@ -182,7 +192,11 @@ var __vue_render__ = function () {
|
|
|
182
192
|
},
|
|
183
193
|
expression: "proxyModelValue"
|
|
184
194
|
}
|
|
185
|
-
}
|
|
195
|
+
}, [_vm._t("checkboxLabel", function () {
|
|
196
|
+
return [_vm._v("\n " + _vm._s(_vm.item.label) + "\n ")];
|
|
197
|
+
}, {
|
|
198
|
+
"item": _vm.item
|
|
199
|
+
})], 2)]], 2);
|
|
186
200
|
};
|
|
187
201
|
var __vue_staticRenderFns__ = [];
|
|
188
202
|
|
|
@@ -23,15 +23,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
23
23
|
};
|
|
24
24
|
collapsible: {
|
|
25
25
|
type: BooleanConstructor;
|
|
26
|
-
default:
|
|
26
|
+
default: () => false;
|
|
27
27
|
};
|
|
28
28
|
disabled: {
|
|
29
29
|
type: BooleanConstructor;
|
|
30
|
-
default:
|
|
30
|
+
default: () => false;
|
|
31
31
|
};
|
|
32
32
|
expanded: {
|
|
33
33
|
type: BooleanConstructor;
|
|
34
|
-
default:
|
|
34
|
+
default: () => true;
|
|
35
35
|
};
|
|
36
36
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
37
37
|
modelValue: {
|
|
@@ -44,15 +44,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
44
44
|
};
|
|
45
45
|
collapsible: {
|
|
46
46
|
type: BooleanConstructor;
|
|
47
|
-
default:
|
|
47
|
+
default: () => false;
|
|
48
48
|
};
|
|
49
49
|
disabled: {
|
|
50
50
|
type: BooleanConstructor;
|
|
51
|
-
default:
|
|
51
|
+
default: () => false;
|
|
52
52
|
};
|
|
53
53
|
expanded: {
|
|
54
54
|
type: BooleanConstructor;
|
|
55
|
-
default:
|
|
55
|
+
default: () => true;
|
|
56
56
|
};
|
|
57
57
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
58
58
|
modelValue: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
2
|
import { defineComponent, toRef } from 'vue-demi';
|
|
3
|
-
import { s as script$1 } from '../OrCheckboxTreeV3-
|
|
3
|
+
import { s as script$1 } from '../OrCheckboxTreeV3-37cb07f2.js';
|
|
4
4
|
import { s as script$2, F as FormGroupDirection } from '../OrFormGroupV3-216f55ee.js';
|
|
5
5
|
import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as default } from '../OrCheckboxTreeV3-
|
|
1
|
+
export { s as default } from '../OrCheckboxTreeV3-37cb07f2.js';
|
|
@@ -11,15 +11,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
collapsible: {
|
|
13
13
|
type: BooleanConstructor;
|
|
14
|
-
default: boolean;
|
|
14
|
+
default: () => boolean;
|
|
15
15
|
};
|
|
16
16
|
disabled: {
|
|
17
17
|
type: BooleanConstructor;
|
|
18
|
-
default: boolean;
|
|
18
|
+
default: () => boolean;
|
|
19
19
|
};
|
|
20
20
|
expanded: {
|
|
21
21
|
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
22
|
+
default: () => boolean;
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
@@ -44,15 +44,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
44
44
|
};
|
|
45
45
|
collapsible: {
|
|
46
46
|
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
47
|
+
default: () => boolean;
|
|
48
48
|
};
|
|
49
49
|
disabled: {
|
|
50
50
|
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
51
|
+
default: () => boolean;
|
|
52
52
|
};
|
|
53
53
|
expanded: {
|
|
54
54
|
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
55
|
+
default: () => boolean;
|
|
56
56
|
};
|
|
57
57
|
}>> & {
|
|
58
58
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as OrCheckboxTreeV3 } from '../OrCheckboxTreeV3-
|
|
1
|
+
export { s as OrCheckboxTreeV3 } from '../OrCheckboxTreeV3-37cb07f2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CheckboxTreeRoot, a as CheckboxTreeRootParent } from '../OrCheckboxTreeV3-
|
|
1
|
+
export { C as CheckboxTreeRoot, a as CheckboxTreeRootParent } from '../OrCheckboxTreeV3-37cb07f2.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../utils/functions/flattenDeep.js';
|
|
2
|
-
export { e as extractChildrenValues } from '../../OrCheckboxTreeV3-
|
|
2
|
+
export { e as extractChildrenValues } from '../../OrCheckboxTreeV3-37cb07f2.js';
|
package/dist/bundled/v3/components/{OrCheckboxTreeV3-958d3e64.js → OrCheckboxTreeV3-37cb07f2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, renderList } from 'vue';
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString, renderList } from 'vue';
|
|
2
2
|
import { defineComponent, toRefs, computed, watch } from 'vue-demi';
|
|
3
3
|
import flattenDeep from '../utils/functions/flattenDeep.js';
|
|
4
4
|
import { s as script$1 } from './OrIconV3-5db4e349.js';
|
|
@@ -54,15 +54,15 @@ var script = defineComponent({
|
|
|
54
54
|
},
|
|
55
55
|
collapsible: {
|
|
56
56
|
type: Boolean,
|
|
57
|
-
default: false
|
|
57
|
+
default: () => false
|
|
58
58
|
},
|
|
59
59
|
disabled: {
|
|
60
60
|
type: Boolean,
|
|
61
|
-
default: false
|
|
61
|
+
default: () => false
|
|
62
62
|
},
|
|
63
63
|
expanded: {
|
|
64
64
|
type: Boolean,
|
|
65
|
-
default: true
|
|
65
|
+
default: () => true
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
emits: ['update:modelValue'],
|
|
@@ -144,48 +144,66 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
144
144
|
class: normalizeClass(_ctx.parentStyles)
|
|
145
145
|
}, [_ctx.collapsible ? (openBlock(), createBlock(_component_OrButton, {
|
|
146
146
|
key: 0,
|
|
147
|
-
variant:
|
|
147
|
+
variant: 'link',
|
|
148
148
|
disabled: _ctx.disabled,
|
|
149
|
-
onClick: _cache[0] || (_cache[0] =
|
|
149
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.setIsOpen(!_ctx.isOpen))
|
|
150
150
|
}, {
|
|
151
151
|
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
152
152
|
class: normalizeClass([_ctx.isOpen ? 'rotate-[180deg]' : 'rotate-0']),
|
|
153
|
-
icon:
|
|
154
|
-
size:
|
|
153
|
+
icon: 'arrow_drop_down',
|
|
154
|
+
size: 'l'
|
|
155
155
|
}, null, 8 /* PROPS */, ["class"])]),
|
|
156
156
|
_: 1 /* STABLE */
|
|
157
157
|
}, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrCheckbox, {
|
|
158
|
-
value: "true",
|
|
159
158
|
"model-value": _ctx.isAllChildrenSelected,
|
|
159
|
+
value: true,
|
|
160
160
|
indeterminate: _ctx.isIntermediate,
|
|
161
|
-
label: _ctx.item.label,
|
|
162
161
|
disabled: _ctx.disabled,
|
|
163
162
|
onClick: _ctx.handleParentClick
|
|
164
|
-
},
|
|
163
|
+
}, {
|
|
164
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
165
|
+
item: _ctx.item
|
|
166
|
+
}, () => [createTextVNode(toDisplayString(_ctx.item.label), 1 /* TEXT */)])]),
|
|
167
|
+
|
|
168
|
+
_: 3 /* FORWARDED */
|
|
169
|
+
}, 8 /* PROPS */, ["model-value", "indeterminate", "disabled", "onClick"])], 2 /* CLASS */), _ctx.hasChildren && _ctx.isOpen ? (openBlock(), createElementBlock("div", {
|
|
165
170
|
key: 0,
|
|
166
|
-
class: normalizeClass(
|
|
167
|
-
'ml-2xl': _ctx.collapsible,
|
|
168
|
-
'ml-lg': !_ctx.collapsible
|
|
169
|
-
})
|
|
171
|
+
class: normalizeClass([_ctx.collapsible ? 'ml-2xl' : 'ml-lg'])
|
|
170
172
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.item.children, child => {
|
|
171
173
|
return openBlock(), createBlock(_component_OrCheckboxTree, {
|
|
172
174
|
key: child.value || child.label,
|
|
173
175
|
modelValue: _ctx.proxyModelValue,
|
|
174
176
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxyModelValue = $event),
|
|
175
|
-
class:
|
|
177
|
+
class: normalizeClass(['mt-xs']),
|
|
176
178
|
item: child,
|
|
177
179
|
collapsible: child.collapsible,
|
|
178
180
|
expanded: child.expanded,
|
|
179
181
|
disabled: _ctx.disabled || child.disabled
|
|
180
|
-
},
|
|
182
|
+
}, {
|
|
183
|
+
checkboxLabel: withCtx(_ref => {
|
|
184
|
+
let {
|
|
185
|
+
item
|
|
186
|
+
} = _ref;
|
|
187
|
+
return [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
188
|
+
item: item
|
|
189
|
+
}, () => [createTextVNode(toDisplayString(item.label), 1 /* TEXT */)])];
|
|
190
|
+
}),
|
|
191
|
+
|
|
192
|
+
_: 2 /* DYNAMIC */
|
|
193
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "item", "collapsible", "expanded", "disabled"]);
|
|
181
194
|
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createBlock(_component_OrCheckbox, {
|
|
182
195
|
key: 1,
|
|
183
196
|
modelValue: _ctx.proxyModelValue,
|
|
184
197
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.proxyModelValue = $event),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
198
|
+
value: _ctx.item.value,
|
|
199
|
+
disabled: _ctx.disabled || _ctx.item.disabled
|
|
200
|
+
}, {
|
|
201
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
202
|
+
item: _ctx.item
|
|
203
|
+
}, () => [createTextVNode(toDisplayString(_ctx.item.label), 1 /* TEXT */)])]),
|
|
204
|
+
|
|
205
|
+
_: 3 /* FORWARDED */
|
|
206
|
+
}, 8 /* PROPS */, ["modelValue", "value", "disabled"]))], 2 /* CLASS */);
|
|
189
207
|
}
|
|
190
208
|
|
|
191
209
|
script.render = render;
|
|
@@ -12,7 +12,7 @@ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes
|
|
|
12
12
|
export { C as CardPadding, s as OrCardV3 } from './OrCardV3-a3bb7835.js';
|
|
13
13
|
export { default as OrCheckbox } from './OrCheckbox/OrCheckbox.js';
|
|
14
14
|
export { default as OrCheckboxGroupV3 } from './OrCheckboxGroupV3/OrCheckboxGroup.js';
|
|
15
|
-
export { s as OrCheckboxTreeV3 } from './OrCheckboxTreeV3-
|
|
15
|
+
export { s as OrCheckboxTreeV3 } from './OrCheckboxTreeV3-37cb07f2.js';
|
|
16
16
|
export { s as OrCheckboxV3 } from './OrCheckboxV3-fcc61e73.js';
|
|
17
17
|
export { s as OrChip, a as OrChips } from './OrChips-9386b9d6.js';
|
|
18
18
|
export { E as EditorState, a as EditorView, q as OrCode, O as OrCodeLanguages, b as basicSetup, h as html, j as javascript, d as json, e as jsonParseLinter, c as lintGutter, l as linter } from './OrCode-7a263a23.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export { B as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, a as BUTTON_SIZE, b as BUTT
|
|
|
78
78
|
export { default as OrIconButton, default as OrIconButtonV2 } from './components/OrIconButtonV2/OrIconButton.js';
|
|
79
79
|
export { default as OrCard } from './components/OrCard/OrCard.js';
|
|
80
80
|
export { default as OrCheckbox } from './components/OrCheckbox/OrCheckbox.js';
|
|
81
|
-
export { s as OrCheckboxTreeV3 } from './components/OrCheckboxTreeV3-
|
|
81
|
+
export { s as OrCheckboxTreeV3 } from './components/OrCheckboxTreeV3-37cb07f2.js';
|
|
82
82
|
export { s as OrCheckboxV3 } from './components/OrCheckboxV3-fcc61e73.js';
|
|
83
83
|
export { default as OrCollapse } from './components/OrCollapse/OrCollapse.js';
|
|
84
84
|
export { I as CombinedInputSize, I as DatePickerSize, I as DateRangePickerSize, I as DateTimePickerSize, I as InputBoxSize, a as InputBoxVariant, I as InputSize, s as OrInputBoxV3, I as SearchSize, I as SelectSize, I as TagInputSize, I as TextareaSize, I as TimePickerSize, I as TimeRangePickerSize } from './components/OrInputBoxV3-90e51950.js';
|
|
@@ -4,7 +4,7 @@ import './dom-aecadd9a.js';
|
|
|
4
4
|
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
5
5
|
import '@onereach/styles/tailwind/plugins/core';
|
|
6
6
|
import '@onereach/styles/tailwind.config.json';
|
|
7
|
-
import { _ as __vue_component__$1 } from './OrCheckboxTree-
|
|
7
|
+
import { _ as __vue_component__$1 } from './OrCheckboxTree-ac1a0899.js';
|
|
8
8
|
import { _ as __vue_component__$2, F as FormGroupDirection } from './OrFormGroup-1aaf6500.js';
|
|
9
9
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
10
10
|
|
|
@@ -62,15 +62,15 @@ var script = defineComponent({
|
|
|
62
62
|
},
|
|
63
63
|
collapsible: {
|
|
64
64
|
type: Boolean,
|
|
65
|
-
default: false
|
|
65
|
+
default: () => false
|
|
66
66
|
},
|
|
67
67
|
disabled: {
|
|
68
68
|
type: Boolean,
|
|
69
|
-
default: false
|
|
69
|
+
default: () => false
|
|
70
70
|
},
|
|
71
71
|
expanded: {
|
|
72
72
|
type: Boolean,
|
|
73
|
-
default: true
|
|
73
|
+
default: () => true
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
emits: ['update:modelValue'],
|
|
@@ -153,46 +153,57 @@ var __vue_render__ = function () {
|
|
|
153
153
|
class: _vm.parentStyles
|
|
154
154
|
}, [_vm.collapsible ? [_c('OrButton', {
|
|
155
155
|
attrs: {
|
|
156
|
-
"variant":
|
|
156
|
+
"variant": 'link',
|
|
157
157
|
"disabled": _vm.disabled
|
|
158
158
|
},
|
|
159
159
|
on: {
|
|
160
|
-
"click": function () {
|
|
160
|
+
"click": function ($event) {
|
|
161
161
|
return _vm.setIsOpen(!_vm.isOpen);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}, [_c('OrIcon', {
|
|
165
165
|
class: [_vm.isOpen ? 'rotate-[180deg]' : 'rotate-0'],
|
|
166
166
|
attrs: {
|
|
167
|
-
"icon":
|
|
168
|
-
"size":
|
|
167
|
+
"icon": 'arrow_drop_down',
|
|
168
|
+
"size": 'l'
|
|
169
169
|
}
|
|
170
170
|
})], 1)] : _vm._e(), _vm._v(" "), _c('OrCheckbox', {
|
|
171
171
|
attrs: {
|
|
172
|
-
"value": "true",
|
|
173
172
|
"model-value": _vm.isAllChildrenSelected,
|
|
173
|
+
"value": true,
|
|
174
174
|
"indeterminate": _vm.isIntermediate,
|
|
175
|
-
"label": _vm.item.label,
|
|
176
175
|
"disabled": _vm.disabled
|
|
177
176
|
},
|
|
178
177
|
on: {
|
|
179
178
|
"click": _vm.handleParentClick
|
|
180
179
|
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
}, [_vm._t("checkboxLabel", function () {
|
|
181
|
+
return [_vm._v("\n " + _vm._s(_vm.item.label) + "\n ")];
|
|
182
|
+
}, {
|
|
183
|
+
"item": _vm.item
|
|
184
|
+
})], 2)], 2), _vm._v(" "), _vm.hasChildren && _vm.isOpen ? _c('div', {
|
|
185
|
+
class: [_vm.collapsible ? 'ml-2xl' : 'ml-lg']
|
|
186
186
|
}, _vm._l(_vm.item.children, function (child) {
|
|
187
187
|
return _c('OrCheckboxTree', {
|
|
188
188
|
key: child.value || child.label,
|
|
189
|
-
|
|
189
|
+
class: ['mt-xs'],
|
|
190
190
|
attrs: {
|
|
191
191
|
"item": child,
|
|
192
192
|
"collapsible": child.collapsible,
|
|
193
193
|
"expanded": child.expanded,
|
|
194
194
|
"disabled": _vm.disabled || child.disabled
|
|
195
195
|
},
|
|
196
|
+
scopedSlots: _vm._u([{
|
|
197
|
+
key: "checkboxLabel",
|
|
198
|
+
fn: function (ref) {
|
|
199
|
+
var item = ref.item;
|
|
200
|
+
return [_vm._t("checkboxLabel", function () {
|
|
201
|
+
return [_vm._v("\n " + _vm._s(item.label) + "\n ")];
|
|
202
|
+
}, {
|
|
203
|
+
"item": item
|
|
204
|
+
})];
|
|
205
|
+
}
|
|
206
|
+
}], null, true),
|
|
196
207
|
model: {
|
|
197
208
|
value: _vm.proxyModelValue,
|
|
198
209
|
callback: function ($$v) {
|
|
@@ -203,9 +214,8 @@ var __vue_render__ = function () {
|
|
|
203
214
|
});
|
|
204
215
|
}), 1) : _vm._e()] : [_c('OrCheckbox', {
|
|
205
216
|
attrs: {
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"value": _vm.item.value
|
|
217
|
+
"value": _vm.item.value,
|
|
218
|
+
"disabled": _vm.disabled || _vm.item.disabled
|
|
209
219
|
},
|
|
210
220
|
model: {
|
|
211
221
|
value: _vm.proxyModelValue,
|
|
@@ -214,7 +224,11 @@ var __vue_render__ = function () {
|
|
|
214
224
|
},
|
|
215
225
|
expression: "proxyModelValue"
|
|
216
226
|
}
|
|
217
|
-
}
|
|
227
|
+
}, [_vm._t("checkboxLabel", function () {
|
|
228
|
+
return [_vm._v("\n " + _vm._s(_vm.item.label) + "\n ")];
|
|
229
|
+
}, {
|
|
230
|
+
"item": _vm.item
|
|
231
|
+
})], 2)]], 2);
|
|
218
232
|
};
|
|
219
233
|
var __vue_staticRenderFns__ = [];
|
|
220
234
|
|
|
@@ -13,8 +13,8 @@ export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCol
|
|
|
13
13
|
export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-696ecfc6.js';
|
|
14
14
|
export { C as CardPadding, _ as OrCardV3 } from '../OrCard-36865e33.js';
|
|
15
15
|
export { _ as OrCheckbox } from '../OrCheckbox-3337d903.js';
|
|
16
|
-
export { _ as OrCheckboxGroupV3 } from '../OrCheckboxGroup-
|
|
17
|
-
export { _ as OrCheckboxTreeV3 } from '../OrCheckboxTree-
|
|
16
|
+
export { _ as OrCheckboxGroupV3 } from '../OrCheckboxGroup-5611e13a.js';
|
|
17
|
+
export { _ as OrCheckboxTreeV3 } from '../OrCheckboxTree-ac1a0899.js';
|
|
18
18
|
export { _ as OrCheckboxV3 } from '../OrCheckbox-601b53f3.js';
|
|
19
19
|
export { _ as OrChip } from '../OrChip-289730fb.js';
|
|
20
20
|
export { _ as OrChips } from '../OrChips-0bb33a9f.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrCheckboxGroupV3 } from '../../OrCheckboxGroup-
|
|
1
|
+
export { _ as OrCheckboxGroupV3 } from '../../OrCheckboxGroup-5611e13a.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import '../../dom-aecadd9a.js';
|
|
@@ -7,7 +7,7 @@ import 'lodash/get';
|
|
|
7
7
|
import '../../useProxyModelValue-940010d2.js';
|
|
8
8
|
import '@onereach/styles/tailwind/plugins/core';
|
|
9
9
|
import '@onereach/styles/tailwind.config.json';
|
|
10
|
-
import '../../OrCheckboxTree-
|
|
10
|
+
import '../../OrCheckboxTree-ac1a0899.js';
|
|
11
11
|
import '../../OrButton-f489e6b3.js';
|
|
12
12
|
import '../../OrButton.vue_rollup-plugin-vue_script-ec8cfaee.js';
|
|
13
13
|
import '../../OrLoader-784e2060.js';
|
|
@@ -23,15 +23,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
23
23
|
};
|
|
24
24
|
collapsible: {
|
|
25
25
|
type: BooleanConstructor;
|
|
26
|
-
default:
|
|
26
|
+
default: () => false;
|
|
27
27
|
};
|
|
28
28
|
disabled: {
|
|
29
29
|
type: BooleanConstructor;
|
|
30
|
-
default:
|
|
30
|
+
default: () => false;
|
|
31
31
|
};
|
|
32
32
|
expanded: {
|
|
33
33
|
type: BooleanConstructor;
|
|
34
|
-
default:
|
|
34
|
+
default: () => true;
|
|
35
35
|
};
|
|
36
36
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
37
37
|
modelValue: {
|
|
@@ -44,15 +44,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
44
44
|
};
|
|
45
45
|
collapsible: {
|
|
46
46
|
type: BooleanConstructor;
|
|
47
|
-
default:
|
|
47
|
+
default: () => false;
|
|
48
48
|
};
|
|
49
49
|
disabled: {
|
|
50
50
|
type: BooleanConstructor;
|
|
51
|
-
default:
|
|
51
|
+
default: () => false;
|
|
52
52
|
};
|
|
53
53
|
expanded: {
|
|
54
54
|
type: BooleanConstructor;
|
|
55
|
-
default:
|
|
55
|
+
default: () => true;
|
|
56
56
|
};
|
|
57
57
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
58
58
|
modelValue: string[];
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -13,8 +13,8 @@ export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from './OrCardColl
|
|
|
13
13
|
export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-696ecfc6.js';
|
|
14
14
|
export { C as CardPadding, _ as OrCardV3 } from './OrCard-36865e33.js';
|
|
15
15
|
export { _ as OrCheckbox } from './OrCheckbox-3337d903.js';
|
|
16
|
-
export { _ as OrCheckboxGroupV3 } from './OrCheckboxGroup-
|
|
17
|
-
export { _ as OrCheckboxTreeV3 } from './OrCheckboxTree-
|
|
16
|
+
export { _ as OrCheckboxGroupV3 } from './OrCheckboxGroup-5611e13a.js';
|
|
17
|
+
export { _ as OrCheckboxTreeV3 } from './OrCheckboxTree-ac1a0899.js';
|
|
18
18
|
export { _ as OrCheckboxV3 } from './OrCheckbox-601b53f3.js';
|
|
19
19
|
export { _ as OrChip } from './OrChip-289730fb.js';
|
|
20
20
|
export { _ as OrChips } from './OrChips-0bb33a9f.js';
|
|
@@ -4,7 +4,7 @@ import './dom-aecadd9a.js';
|
|
|
4
4
|
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
5
5
|
import '@onereach/styles/tailwind/plugins/core';
|
|
6
6
|
import '@onereach/styles/tailwind.config.json';
|
|
7
|
-
import { s as script$1 } from './OrCheckboxTree-
|
|
7
|
+
import { s as script$1 } from './OrCheckboxTree-0bb3e284.js';
|
|
8
8
|
import { s as script$2, F as FormGroupDirection } from './OrFormGroup-44b0ba75.js';
|
|
9
9
|
import { resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementBlock, Fragment, renderList } from 'vue';
|
|
10
10
|
|
|
@@ -7,7 +7,7 @@ import '@onereach/styles/tailwind.config.json';
|
|
|
7
7
|
import { s as script$3 } from './OrButton-9ca0dc8e.js';
|
|
8
8
|
import { s as script$2 } from './OrCheckbox-11bad915.js';
|
|
9
9
|
import { s as script$1 } from './OrIcon-b2e2d0aa.js';
|
|
10
|
-
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, renderList } from 'vue';
|
|
10
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, createElementVNode, createBlock, withCtx, createVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString, renderList } from 'vue';
|
|
11
11
|
|
|
12
12
|
function flattenDeep() {
|
|
13
13
|
let arr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -61,15 +61,15 @@ var script = defineComponent({
|
|
|
61
61
|
},
|
|
62
62
|
collapsible: {
|
|
63
63
|
type: Boolean,
|
|
64
|
-
default: false
|
|
64
|
+
default: () => false
|
|
65
65
|
},
|
|
66
66
|
disabled: {
|
|
67
67
|
type: Boolean,
|
|
68
|
-
default: false
|
|
68
|
+
default: () => false
|
|
69
69
|
},
|
|
70
70
|
expanded: {
|
|
71
71
|
type: Boolean,
|
|
72
|
-
default: true
|
|
72
|
+
default: () => true
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
emits: ['update:modelValue'],
|
|
@@ -151,48 +151,66 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
151
151
|
class: normalizeClass(_ctx.parentStyles)
|
|
152
152
|
}, [_ctx.collapsible ? (openBlock(), createBlock(_component_OrButton, {
|
|
153
153
|
key: 0,
|
|
154
|
-
variant:
|
|
154
|
+
variant: 'link',
|
|
155
155
|
disabled: _ctx.disabled,
|
|
156
|
-
onClick: _cache[0] || (_cache[0] =
|
|
156
|
+
onClick: _cache[0] || (_cache[0] = $event => _ctx.setIsOpen(!_ctx.isOpen))
|
|
157
157
|
}, {
|
|
158
158
|
default: withCtx(() => [createVNode(_component_OrIcon, {
|
|
159
159
|
class: normalizeClass([_ctx.isOpen ? 'rotate-[180deg]' : 'rotate-0']),
|
|
160
|
-
icon:
|
|
161
|
-
size:
|
|
160
|
+
icon: 'arrow_drop_down',
|
|
161
|
+
size: 'l'
|
|
162
162
|
}, null, 8 /* PROPS */, ["class"])]),
|
|
163
163
|
_: 1 /* STABLE */
|
|
164
164
|
}, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrCheckbox, {
|
|
165
|
-
value: "true",
|
|
166
165
|
"model-value": _ctx.isAllChildrenSelected,
|
|
166
|
+
value: true,
|
|
167
167
|
indeterminate: _ctx.isIntermediate,
|
|
168
|
-
label: _ctx.item.label,
|
|
169
168
|
disabled: _ctx.disabled,
|
|
170
169
|
onClick: _ctx.handleParentClick
|
|
171
|
-
},
|
|
170
|
+
}, {
|
|
171
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
172
|
+
item: _ctx.item
|
|
173
|
+
}, () => [createTextVNode(toDisplayString(_ctx.item.label), 1 /* TEXT */)])]),
|
|
174
|
+
|
|
175
|
+
_: 3 /* FORWARDED */
|
|
176
|
+
}, 8 /* PROPS */, ["model-value", "indeterminate", "disabled", "onClick"])], 2 /* CLASS */), _ctx.hasChildren && _ctx.isOpen ? (openBlock(), createElementBlock("div", {
|
|
172
177
|
key: 0,
|
|
173
|
-
class: normalizeClass(
|
|
174
|
-
'ml-2xl': _ctx.collapsible,
|
|
175
|
-
'ml-lg': !_ctx.collapsible
|
|
176
|
-
})
|
|
178
|
+
class: normalizeClass([_ctx.collapsible ? 'ml-2xl' : 'ml-lg'])
|
|
177
179
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.item.children, child => {
|
|
178
180
|
return openBlock(), createBlock(_component_OrCheckboxTree, {
|
|
179
181
|
key: child.value || child.label,
|
|
180
182
|
modelValue: _ctx.proxyModelValue,
|
|
181
183
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => _ctx.proxyModelValue = $event),
|
|
182
|
-
class:
|
|
184
|
+
class: normalizeClass(['mt-xs']),
|
|
183
185
|
item: child,
|
|
184
186
|
collapsible: child.collapsible,
|
|
185
187
|
expanded: child.expanded,
|
|
186
188
|
disabled: _ctx.disabled || child.disabled
|
|
187
|
-
},
|
|
189
|
+
}, {
|
|
190
|
+
checkboxLabel: withCtx(_ref => {
|
|
191
|
+
let {
|
|
192
|
+
item
|
|
193
|
+
} = _ref;
|
|
194
|
+
return [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
195
|
+
item: item
|
|
196
|
+
}, () => [createTextVNode(toDisplayString(item.label), 1 /* TEXT */)])];
|
|
197
|
+
}),
|
|
198
|
+
|
|
199
|
+
_: 2 /* DYNAMIC */
|
|
200
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "item", "collapsible", "expanded", "disabled"]);
|
|
188
201
|
}), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createBlock(_component_OrCheckbox, {
|
|
189
202
|
key: 1,
|
|
190
203
|
modelValue: _ctx.proxyModelValue,
|
|
191
204
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.proxyModelValue = $event),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
205
|
+
value: _ctx.item.value,
|
|
206
|
+
disabled: _ctx.disabled || _ctx.item.disabled
|
|
207
|
+
}, {
|
|
208
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "checkboxLabel", {
|
|
209
|
+
item: _ctx.item
|
|
210
|
+
}, () => [createTextVNode(toDisplayString(_ctx.item.label), 1 /* TEXT */)])]),
|
|
211
|
+
|
|
212
|
+
_: 3 /* FORWARDED */
|
|
213
|
+
}, 8 /* PROPS */, ["modelValue", "value", "disabled"]))], 2 /* CLASS */);
|
|
196
214
|
}
|
|
197
215
|
|
|
198
216
|
script.render = render;
|
|
@@ -11,8 +11,8 @@ export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCol
|
|
|
11
11
|
export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-c4880ae9.js';
|
|
12
12
|
export { C as CardPadding, s as OrCardV3 } from '../OrCard-1e84e107.js';
|
|
13
13
|
export { s as OrCheckbox } from '../OrCheckbox-42ed332c.js';
|
|
14
|
-
export { s as OrCheckboxGroupV3 } from '../OrCheckboxGroup-
|
|
15
|
-
export { s as OrCheckboxTreeV3 } from '../OrCheckboxTree-
|
|
14
|
+
export { s as OrCheckboxGroupV3 } from '../OrCheckboxGroup-b802d08c.js';
|
|
15
|
+
export { s as OrCheckboxTreeV3 } from '../OrCheckboxTree-0bb3e284.js';
|
|
16
16
|
export { s as OrCheckboxV3 } from '../OrCheckbox-11bad915.js';
|
|
17
17
|
export { s as OrChip } from '../OrChip-2e26629d.js';
|
|
18
18
|
export { s as OrChips } from '../OrChips-58954587.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrCheckboxGroupV3 } from '../../OrCheckboxGroup-
|
|
1
|
+
export { s as OrCheckboxGroupV3 } from '../../OrCheckboxGroup-b802d08c.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import '../../dom-aecadd9a.js';
|
|
@@ -7,7 +7,7 @@ import 'lodash/get';
|
|
|
7
7
|
import '../../useProxyModelValue-940010d2.js';
|
|
8
8
|
import '@onereach/styles/tailwind/plugins/core';
|
|
9
9
|
import '@onereach/styles/tailwind.config.json';
|
|
10
|
-
import '../../OrCheckboxTree-
|
|
10
|
+
import '../../OrCheckboxTree-0bb3e284.js';
|
|
11
11
|
import '../../OrButton-9ca0dc8e.js';
|
|
12
12
|
import '../../OrLoader-b7d415dd.js';
|
|
13
13
|
import 'vue';
|
|
@@ -11,15 +11,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
11
11
|
};
|
|
12
12
|
collapsible: {
|
|
13
13
|
type: BooleanConstructor;
|
|
14
|
-
default: boolean;
|
|
14
|
+
default: () => boolean;
|
|
15
15
|
};
|
|
16
16
|
disabled: {
|
|
17
17
|
type: BooleanConstructor;
|
|
18
|
-
default: boolean;
|
|
18
|
+
default: () => boolean;
|
|
19
19
|
};
|
|
20
20
|
expanded: {
|
|
21
21
|
type: BooleanConstructor;
|
|
22
|
-
default: boolean;
|
|
22
|
+
default: () => boolean;
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
@@ -44,15 +44,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
44
44
|
};
|
|
45
45
|
collapsible: {
|
|
46
46
|
type: BooleanConstructor;
|
|
47
|
-
default: boolean;
|
|
47
|
+
default: () => boolean;
|
|
48
48
|
};
|
|
49
49
|
disabled: {
|
|
50
50
|
type: BooleanConstructor;
|
|
51
|
-
default: boolean;
|
|
51
|
+
default: () => boolean;
|
|
52
52
|
};
|
|
53
53
|
expanded: {
|
|
54
54
|
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
55
|
+
default: () => boolean;
|
|
56
56
|
};
|
|
57
57
|
}>> & {
|
|
58
58
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -11,8 +11,8 @@ export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardColl
|
|
|
11
11
|
export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-c4880ae9.js';
|
|
12
12
|
export { C as CardPadding, s as OrCardV3 } from './OrCard-1e84e107.js';
|
|
13
13
|
export { s as OrCheckbox } from './OrCheckbox-42ed332c.js';
|
|
14
|
-
export { s as OrCheckboxGroupV3 } from './OrCheckboxGroup-
|
|
15
|
-
export { s as OrCheckboxTreeV3 } from './OrCheckboxTree-
|
|
14
|
+
export { s as OrCheckboxGroupV3 } from './OrCheckboxGroup-b802d08c.js';
|
|
15
|
+
export { s as OrCheckboxTreeV3 } from './OrCheckboxTree-0bb3e284.js';
|
|
16
16
|
export { s as OrCheckboxV3 } from './OrCheckbox-11bad915.js';
|
|
17
17
|
export { s as OrChip } from './OrChip-2e26629d.js';
|
|
18
18
|
export { s as OrChips } from './OrChips-58954587.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "8.23.
|
|
3
|
+
"version": "8.23.2-beta.4138.0",
|
|
4
4
|
"npmUnpacked": "4.15.2",
|
|
5
5
|
"description": "Vue components library for v2/3",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -177,6 +177,5 @@
|
|
|
177
177
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
178
178
|
},
|
|
179
179
|
"./package.json": "./package.json"
|
|
180
|
-
}
|
|
181
|
-
"gitHead": "1024abf657bb7ccbc8bebb801a72eca1f645571a"
|
|
180
|
+
}
|
|
182
181
|
}
|
|
@@ -5,63 +5,82 @@
|
|
|
5
5
|
>
|
|
6
6
|
<template v-if="hasChildren">
|
|
7
7
|
<div :class="parentStyles">
|
|
8
|
-
<template
|
|
9
|
-
v-if="collapsible"
|
|
10
|
-
>
|
|
8
|
+
<template v-if="collapsible">
|
|
11
9
|
<OrButton
|
|
12
|
-
variant="link"
|
|
10
|
+
:variant="'link'"
|
|
13
11
|
:disabled="disabled"
|
|
14
|
-
@click="
|
|
12
|
+
@click="setIsOpen(!isOpen)"
|
|
15
13
|
>
|
|
16
14
|
<OrIcon
|
|
17
15
|
:class="[isOpen ? 'rotate-[180deg]': 'rotate-0']"
|
|
18
|
-
icon="arrow_drop_down"
|
|
19
|
-
size="l"
|
|
16
|
+
:icon="'arrow_drop_down'"
|
|
17
|
+
:size="'l'"
|
|
20
18
|
/>
|
|
21
19
|
</OrButton>
|
|
22
20
|
</template>
|
|
21
|
+
|
|
23
22
|
<OrCheckbox
|
|
24
|
-
value="true"
|
|
25
23
|
:model-value="isAllChildrenSelected"
|
|
24
|
+
:value="true"
|
|
26
25
|
:indeterminate="isIntermediate"
|
|
27
|
-
:label="item.label"
|
|
28
26
|
:disabled="disabled"
|
|
29
27
|
@click="handleParentClick"
|
|
30
|
-
|
|
28
|
+
>
|
|
29
|
+
<slot
|
|
30
|
+
name="checkboxLabel"
|
|
31
|
+
:item="item"
|
|
32
|
+
>
|
|
33
|
+
{{ item.label }}
|
|
34
|
+
</slot>
|
|
35
|
+
</OrCheckbox>
|
|
31
36
|
</div>
|
|
37
|
+
|
|
32
38
|
<div
|
|
33
39
|
v-if="hasChildren && isOpen"
|
|
34
|
-
:class="
|
|
35
|
-
'ml-2xl': collapsible,
|
|
36
|
-
'ml-lg': !collapsible
|
|
37
|
-
}"
|
|
40
|
+
:class="[collapsible ? 'ml-2xl' : 'ml-lg']"
|
|
38
41
|
>
|
|
39
42
|
<OrCheckboxTree
|
|
40
43
|
v-for="child in item.children"
|
|
41
44
|
:key="child.value || child.label"
|
|
42
45
|
v-model="proxyModelValue"
|
|
43
|
-
class="mt-xs"
|
|
46
|
+
:class="['mt-xs']"
|
|
44
47
|
:item="child"
|
|
45
48
|
:collapsible="child.collapsible"
|
|
46
49
|
:expanded="child.expanded"
|
|
47
50
|
:disabled="disabled || child.disabled"
|
|
48
|
-
|
|
51
|
+
>
|
|
52
|
+
<template v-slot:checkboxLabel="{ item }">
|
|
53
|
+
<slot
|
|
54
|
+
name="checkboxLabel"
|
|
55
|
+
:item="item"
|
|
56
|
+
>
|
|
57
|
+
{{ item.label }}
|
|
58
|
+
</slot>
|
|
59
|
+
</template>
|
|
60
|
+
</OrCheckboxTree>
|
|
49
61
|
</div>
|
|
50
62
|
</template>
|
|
63
|
+
|
|
51
64
|
<template v-else>
|
|
52
65
|
<OrCheckbox
|
|
53
66
|
v-model="proxyModelValue"
|
|
54
|
-
:disabled="disabled || item.disabled"
|
|
55
|
-
:label="item.label"
|
|
56
67
|
:value="item.value"
|
|
57
|
-
|
|
68
|
+
:disabled="disabled || item.disabled"
|
|
69
|
+
>
|
|
70
|
+
<slot
|
|
71
|
+
name="checkboxLabel"
|
|
72
|
+
:item="item"
|
|
73
|
+
>
|
|
74
|
+
{{ item.label }}
|
|
75
|
+
</slot>
|
|
76
|
+
</OrCheckbox>
|
|
58
77
|
</template>
|
|
59
78
|
</div>
|
|
60
79
|
</template>
|
|
61
80
|
|
|
62
81
|
<script lang="ts">
|
|
63
82
|
import { useToggle } from '@vueuse/core';
|
|
64
|
-
import { computed, defineComponent,
|
|
83
|
+
import { PropType, computed, defineComponent, toRefs, watch } from 'vue-demi';
|
|
65
84
|
import { useProxyModelValue } from '../../hooks';
|
|
66
85
|
import { OrButtonV3 as OrButton } from '../or-button-v3';
|
|
67
86
|
import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
|
|
@@ -72,6 +91,7 @@ import { extractChildrenValues } from './utils/extractChildrenValues';
|
|
|
72
91
|
|
|
73
92
|
export default defineComponent({
|
|
74
93
|
name: 'OrCheckboxTree',
|
|
94
|
+
|
|
75
95
|
components: {
|
|
76
96
|
OrIcon,
|
|
77
97
|
OrCheckbox,
|
|
@@ -88,21 +108,25 @@ export default defineComponent({
|
|
|
88
108
|
type: Array as PropType<string[]>,
|
|
89
109
|
default: () => [],
|
|
90
110
|
},
|
|
111
|
+
|
|
91
112
|
item: {
|
|
92
113
|
type: Object as PropType<CheckboxTreeNode>,
|
|
93
114
|
required: true,
|
|
94
115
|
},
|
|
116
|
+
|
|
95
117
|
collapsible: {
|
|
96
118
|
type: Boolean,
|
|
97
|
-
default: false,
|
|
119
|
+
default: () => false,
|
|
98
120
|
},
|
|
121
|
+
|
|
99
122
|
disabled: {
|
|
100
123
|
type: Boolean,
|
|
101
|
-
default: false,
|
|
124
|
+
default: () => false,
|
|
102
125
|
},
|
|
126
|
+
|
|
103
127
|
expanded: {
|
|
104
128
|
type: Boolean,
|
|
105
|
-
default: true,
|
|
129
|
+
default: () => true,
|
|
106
130
|
},
|
|
107
131
|
},
|
|
108
132
|
|