@onereach/ui-components 4.15.2 → 4.15.3-beta.3053.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/OrSelectV3/OrSelect.js +31 -23
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.vue.d.ts +2 -0
- package/dist/bundled/v2/components/OrSelectV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrSelectV3/styles.js +6 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-a9bc810d.js → OrSelect.vue_vue_type_script_lang-c70d3f4e.js} +3 -1
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +29 -25
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +1 -0
- package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrSelectV3/styles.js +6 -1
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/{OrSelect-87c52f1f.js → OrSelect-5b9b51e3.js} +35 -22
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-select-v3/index.js +1 -1
- package/dist/esm/v2/components/or-select-v3/styles.d.ts +1 -0
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrSelect-38aea86a.js → OrSelect-97cccfd0.js} +34 -23
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +1 -0
- package/dist/esm/v3/components/or-select-v3/index.js +1 -1
- package/dist/esm/v3/components/or-select-v3/styles.d.ts +1 -0
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -3
- package/src/components/or-select-v3/OrSelect.vue +78 -69
- package/src/components/or-select-v3/styles.ts +9 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, ref, computed, toRef, onMounted, watch } from 'vue-demi';
|
|
2
2
|
import { isEmptyValue } from '../../utils/isEmptyValue.js';
|
|
3
|
-
import { SelectRoot, SelectControl, SelectPlaceholder, SelectDropdown, SelectDropdownFlipped, SelectDropdownDefault, SelectNoSearchResults } from './styles.js';
|
|
3
|
+
import { SelectRoot, SelectControl, SelectSearchControl, SelectPlaceholder, SelectDropdown, SelectDropdownFlipped, SelectDropdownDefault, SelectNoSearchResults } from './styles.js';
|
|
4
4
|
import __vue_component__$1 from '../OrCheckboxV3/OrCheckbox.js';
|
|
5
5
|
import __vue_component__$2 from '../OrErrorV3/OrError.js';
|
|
6
6
|
import __vue_component__$3 from '../OrExpansionPanelV3/OrExpansionPanel.js';
|
|
@@ -184,6 +184,7 @@ var script = defineComponent({
|
|
|
184
184
|
// Styles
|
|
185
185
|
const rootStyles = computed(() => ['or-select-v3', ...SelectRoot]);
|
|
186
186
|
const controlStyles = computed(() => [...SelectControl]);
|
|
187
|
+
const searchControlStyles = computed(() => [...SelectSearchControl]);
|
|
187
188
|
const placeholderStyles = computed(() => [...SelectPlaceholder]);
|
|
188
189
|
const dropdownStyles = computed(() => {
|
|
189
190
|
var _a;
|
|
@@ -279,6 +280,7 @@ var script = defineComponent({
|
|
|
279
280
|
popoverState,
|
|
280
281
|
rootStyles,
|
|
281
282
|
controlStyles,
|
|
283
|
+
searchControlStyles,
|
|
282
284
|
placeholderStyles,
|
|
283
285
|
dropdownStyles,
|
|
284
286
|
noSearchResultsStyles,
|
|
@@ -346,7 +348,27 @@ var __vue_render__ = function () {
|
|
|
346
348
|
"readonly": _vm.readonly,
|
|
347
349
|
"disabled": _vm.disabled
|
|
348
350
|
}
|
|
349
|
-
}, [_c('
|
|
351
|
+
}, [_vm.popoverState === 'open' && _vm.enableSearch ? [_c('OrInput', {
|
|
352
|
+
class: _vm.searchControlStyles,
|
|
353
|
+
attrs: {
|
|
354
|
+
"type": 'search',
|
|
355
|
+
"placeholder": 'Search',
|
|
356
|
+
"size": _vm.size,
|
|
357
|
+
"disable-default-styles": true
|
|
358
|
+
},
|
|
359
|
+
on: {
|
|
360
|
+
"click": function ($event) {
|
|
361
|
+
$event.stopPropagation();
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
model: {
|
|
365
|
+
value: _vm.searchText,
|
|
366
|
+
callback: function ($$v) {
|
|
367
|
+
_vm.searchText = $$v;
|
|
368
|
+
},
|
|
369
|
+
expression: "searchText"
|
|
370
|
+
}
|
|
371
|
+
})] : [_c('div', {
|
|
350
372
|
ref: "control",
|
|
351
373
|
class: _vm.controlStyles,
|
|
352
374
|
attrs: {
|
|
@@ -363,9 +385,9 @@ var __vue_render__ = function () {
|
|
|
363
385
|
}
|
|
364
386
|
}
|
|
365
387
|
}, [_vm.multiple ? [_vm.proxyModelValue && _vm.proxyModelValue.length > 0 ? [_vm._t("valueTemplate", function () {
|
|
366
|
-
return _vm._l(_vm.selection, function (option
|
|
388
|
+
return _vm._l(_vm.selection, function (option) {
|
|
367
389
|
return _c('OrTag', {
|
|
368
|
-
key:
|
|
390
|
+
key: option.value,
|
|
369
391
|
attrs: {
|
|
370
392
|
"variant": 'reset',
|
|
371
393
|
"disabled": _vm.disabled || _vm.readonly
|
|
@@ -375,7 +397,7 @@ var __vue_render__ = function () {
|
|
|
375
397
|
return _vm.deselect(option);
|
|
376
398
|
}
|
|
377
399
|
}
|
|
378
|
-
}, [_vm._v("\n
|
|
400
|
+
}, [_vm._v("\n " + _vm._s(option.label) + "\n ")]);
|
|
379
401
|
});
|
|
380
402
|
}, {
|
|
381
403
|
"model": _vm.proxyModelValue
|
|
@@ -384,12 +406,12 @@ var __vue_render__ = function () {
|
|
|
384
406
|
}, [_vm._v(_vm._s(_vm.placeholder))])]] : [!_vm.isEmptyModelValue ? [_vm._t("valueTemplate", function () {
|
|
385
407
|
return [_c('span', {
|
|
386
408
|
staticClass: "truncate"
|
|
387
|
-
}, [_vm._v("\n
|
|
409
|
+
}, [_vm._v("\n " + _vm._s(_vm.selection.label) + "\n ")])];
|
|
388
410
|
}, {
|
|
389
411
|
"model": _vm.proxyModelValue
|
|
390
412
|
})] : [_c('span', {
|
|
391
413
|
class: _vm.placeholderStyles
|
|
392
|
-
}, [_vm._v(_vm._s(_vm.placeholder))])]]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n
|
|
414
|
+
}, [_vm._v(_vm._s(_vm.placeholder))])]]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n +" + _vm._s(_vm.outerItems.length) + "\n ")] : _vm._e(), _vm._v(" "), _c('div', {
|
|
393
415
|
class: ['layout-inline-row', 'gap-sm']
|
|
394
416
|
}, [!_vm.multiple && _vm.proxyModelValue ? [_c('OrIconButton', {
|
|
395
417
|
attrs: {
|
|
@@ -408,7 +430,7 @@ var __vue_render__ = function () {
|
|
|
408
430
|
"icon": _vm.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
|
|
409
431
|
"variant": 'outlined'
|
|
410
432
|
}
|
|
411
|
-
})], 2), _vm._v(" "), _c('OrPopover', {
|
|
433
|
+
})], 2)], _vm._v(" "), _c('OrPopover', {
|
|
412
434
|
ref: "popover",
|
|
413
435
|
attrs: {
|
|
414
436
|
"variant": 'auto',
|
|
@@ -418,21 +440,7 @@ var __vue_render__ = function () {
|
|
|
418
440
|
"custom-styles": _vm.dropdownStyles,
|
|
419
441
|
"disable-default-styles": true
|
|
420
442
|
}
|
|
421
|
-
}, [_vm.
|
|
422
|
-
attrs: {
|
|
423
|
-
"type": 'search',
|
|
424
|
-
"placeholder": 'Search',
|
|
425
|
-
"size": 's',
|
|
426
|
-
"disable-default-styles": true
|
|
427
|
-
},
|
|
428
|
-
model: {
|
|
429
|
-
value: _vm.searchText,
|
|
430
|
-
callback: function ($$v) {
|
|
431
|
-
_vm.searchText = $$v;
|
|
432
|
-
},
|
|
433
|
-
expression: "searchText"
|
|
434
|
-
}
|
|
435
|
-
})] : _vm._e(), _vm._v(" "), _vm.resolvedSearchOptions.length > 0 ? [_vm.groupByFunction ? _vm._l(_vm.groupedOptions, function (group, groupName) {
|
|
443
|
+
}, [_vm.resolvedSearchOptions.length > 0 ? [_vm.groupByFunction ? _vm._l(_vm.groupedOptions, function (group, groupName) {
|
|
436
444
|
return _c('OrExpansionPanel', {
|
|
437
445
|
key: groupName,
|
|
438
446
|
attrs: {
|
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
19
19
|
popoverState: import("@vue/composition-api").ComputedRef<undefined>;
|
|
20
20
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
21
21
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
22
|
+
searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
22
23
|
placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
23
24
|
dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
24
25
|
noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
@@ -206,6 +207,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
206
207
|
popoverState: import("@vue/composition-api").ComputedRef<undefined>;
|
|
207
208
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
208
209
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
210
|
+
searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
209
211
|
placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
210
212
|
dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
211
213
|
noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SelectRoot: string[];
|
|
2
2
|
export declare const SelectControl: string[];
|
|
3
|
+
export declare const SelectSearchControl: string[];
|
|
3
4
|
export declare const SelectPlaceholder: string[];
|
|
4
5
|
export declare const SelectDropdown: string[];
|
|
5
6
|
export declare const SelectDropdownDefault: string[];
|
|
@@ -14,6 +14,11 @@ const SelectControl = [
|
|
|
14
14
|
'gap-xs',
|
|
15
15
|
// Typography
|
|
16
16
|
'typography-inherit'];
|
|
17
|
+
const SelectSearchControl = [
|
|
18
|
+
// Box
|
|
19
|
+
'w-full',
|
|
20
|
+
// Spacing
|
|
21
|
+
'!mx-none', '!my-none'];
|
|
17
22
|
const SelectPlaceholder = [
|
|
18
23
|
// Theme
|
|
19
24
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
@@ -48,4 +53,4 @@ const SelectNoSearchResults = [
|
|
|
48
53
|
// Theme
|
|
49
54
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
50
55
|
|
|
51
|
-
export { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot };
|
|
56
|
+
export { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot, SelectSearchControl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, getCurrentInstance, ref, computed, toRef, onMounted, watch } from 'vue-demi';
|
|
2
2
|
import { isEmptyValue } from './utils/isEmptyValue.js';
|
|
3
|
-
import { SelectRoot, SelectControl, SelectPlaceholder, SelectDropdown, SelectDropdownFlipped, SelectDropdownDefault, SelectNoSearchResults } from './components/OrSelectV3/styles.js';
|
|
3
|
+
import { SelectRoot, SelectControl, SelectSearchControl, SelectPlaceholder, SelectDropdown, SelectDropdownFlipped, SelectDropdownDefault, SelectNoSearchResults } from './components/OrSelectV3/styles.js';
|
|
4
4
|
import './components/OrCheckboxV3/OrCheckbox.js';
|
|
5
5
|
import './components/OrErrorV3/OrError.js';
|
|
6
6
|
import './components/OrExpansionPanelV3/OrExpansionPanel.js';
|
|
@@ -153,6 +153,7 @@ var script = defineComponent({
|
|
|
153
153
|
// Styles
|
|
154
154
|
const rootStyles = computed(() => ['or-select-v3', ...SelectRoot]);
|
|
155
155
|
const controlStyles = computed(() => [...SelectControl]);
|
|
156
|
+
const searchControlStyles = computed(() => [...SelectSearchControl]);
|
|
156
157
|
const placeholderStyles = computed(() => [...SelectPlaceholder]);
|
|
157
158
|
const dropdownStyles = computed(() => {
|
|
158
159
|
var _a;
|
|
@@ -248,6 +249,7 @@ var script = defineComponent({
|
|
|
248
249
|
popoverState,
|
|
249
250
|
rootStyles,
|
|
250
251
|
controlStyles,
|
|
252
|
+
searchControlStyles,
|
|
251
253
|
placeholderStyles,
|
|
252
254
|
dropdownStyles,
|
|
253
255
|
noSearchResultsStyles,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { s as script } from '../../OrSelect.vue_vue_type_script_lang-
|
|
2
|
-
export { s as default } from '../../OrSelect.vue_vue_type_script_lang-
|
|
3
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives,
|
|
1
|
+
import { s as script } from '../../OrSelect.vue_vue_type_script_lang-c70d3f4e.js';
|
|
2
|
+
export { s as default } from '../../OrSelect.vue_vue_type_script_lang-c70d3f4e.js';
|
|
3
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, withModifiers, Fragment, createElementVNode, renderList, createVNode, vShow } from 'vue';
|
|
4
4
|
import 'vue-demi';
|
|
5
5
|
import '../../utils/isEmptyValue.js';
|
|
6
6
|
import './styles.js';
|
|
@@ -95,10 +95,10 @@ const _hoisted_5 = {
|
|
|
95
95
|
};
|
|
96
96
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
97
97
|
const _component_OrLabel = resolveComponent("OrLabel");
|
|
98
|
+
const _component_OrInput = resolveComponent("OrInput");
|
|
98
99
|
const _component_OrTag = resolveComponent("OrTag");
|
|
99
100
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
100
101
|
const _component_OrIcon = resolveComponent("OrIcon");
|
|
101
|
-
const _component_OrInput = resolveComponent("OrInput");
|
|
102
102
|
const _component_OrCheckbox = resolveComponent("OrCheckbox");
|
|
103
103
|
const _component_OrMenuItem = resolveComponent("OrMenuItem");
|
|
104
104
|
const _component_OrExpansionPanel = resolveComponent("OrExpansionPanel");
|
|
@@ -131,22 +131,34 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
131
131
|
readonly: _ctx.readonly,
|
|
132
132
|
disabled: _ctx.disabled
|
|
133
133
|
}, {
|
|
134
|
-
default: withCtx(() => [
|
|
134
|
+
default: withCtx(() => [_ctx.popoverState === 'open' && _ctx.enableSearch ? (openBlock(), createBlock(_component_OrInput, {
|
|
135
|
+
key: 0,
|
|
136
|
+
modelValue: _ctx.searchText,
|
|
137
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.searchText = $event),
|
|
138
|
+
class: normalizeClass(_ctx.searchControlStyles),
|
|
139
|
+
type: 'search',
|
|
140
|
+
placeholder: 'Search',
|
|
141
|
+
size: _ctx.size,
|
|
142
|
+
"disable-default-styles": true,
|
|
143
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
144
|
+
}, null, 8 /* PROPS */, ["modelValue", "class", "size"])) : (openBlock(), createElementBlock(Fragment, {
|
|
145
|
+
key: 1
|
|
146
|
+
}, [createElementVNode("div", {
|
|
135
147
|
id: _ctx.controlId,
|
|
136
148
|
ref: "control",
|
|
137
149
|
class: normalizeClass(_ctx.controlStyles),
|
|
138
150
|
tabindex: !_ctx.disabled ? 0 : null,
|
|
139
151
|
disabled: _ctx.disabled,
|
|
140
|
-
onFocus: _cache[
|
|
141
|
-
onBlur: _cache[
|
|
152
|
+
onFocus: _cache[2] || (_cache[2] = $event => _ctx.$emit('focus', $event)),
|
|
153
|
+
onBlur: _cache[3] || (_cache[3] = $event => _ctx.$emit('blur', $event))
|
|
142
154
|
}, [_ctx.multiple ? (openBlock(), createElementBlock(Fragment, {
|
|
143
155
|
key: 0
|
|
144
156
|
}, [_ctx.proxyModelValue && _ctx.proxyModelValue.length > 0 ? renderSlot(_ctx.$slots, "valueTemplate", {
|
|
145
157
|
key: 0,
|
|
146
158
|
model: _ctx.proxyModelValue
|
|
147
|
-
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection,
|
|
159
|
+
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection, option => {
|
|
148
160
|
return openBlock(), createBlock(_component_OrTag, {
|
|
149
|
-
key:
|
|
161
|
+
key: option.value,
|
|
150
162
|
variant: 'reset',
|
|
151
163
|
disabled: _ctx.disabled || _ctx.readonly,
|
|
152
164
|
onReset: $event => _ctx.deselect(option)
|
|
@@ -163,7 +175,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
163
175
|
}, [!_ctx.isEmptyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
|
|
164
176
|
key: 0,
|
|
165
177
|
model: _ctx.proxyModelValue
|
|
166
|
-
}, () => [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.selection
|
|
178
|
+
}, () => [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.selection.label), 1 /* TEXT */)]) : (openBlock(), createElementBlock("span", {
|
|
167
179
|
key: 1,
|
|
168
180
|
class: normalizeClass(_ctx.placeholderStyles)
|
|
169
181
|
}, toDisplayString(_ctx.placeholder), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
@@ -173,11 +185,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
173
185
|
icon: 'close',
|
|
174
186
|
color: 'inherit',
|
|
175
187
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
176
|
-
onClick: _cache[
|
|
188
|
+
onClick: _cache[4] || (_cache[4] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
|
|
177
189
|
}, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrIcon, {
|
|
178
190
|
icon: _ctx.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
|
|
179
191
|
variant: 'outlined'
|
|
180
|
-
}, null, 8 /* PROPS */, ["icon"])]), createVNode(_component_OrPopover, {
|
|
192
|
+
}, null, 8 /* PROPS */, ["icon"])])], 64 /* STABLE_FRAGMENT */)), createVNode(_component_OrPopover, {
|
|
181
193
|
ref: "popover",
|
|
182
194
|
variant: 'auto',
|
|
183
195
|
trigger: _ctx.inputBoxRoot,
|
|
@@ -186,16 +198,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
186
198
|
"custom-styles": _ctx.dropdownStyles,
|
|
187
199
|
"disable-default-styles": true
|
|
188
200
|
}, {
|
|
189
|
-
default: withCtx(() => [_ctx.
|
|
190
|
-
key: 0
|
|
191
|
-
modelValue: _ctx.searchText,
|
|
192
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.searchText = $event),
|
|
193
|
-
type: 'search',
|
|
194
|
-
placeholder: 'Search',
|
|
195
|
-
size: 's',
|
|
196
|
-
"disable-default-styles": true
|
|
197
|
-
}, null, 8 /* PROPS */, ["modelValue"])) : createCommentVNode("v-if", true), _ctx.resolvedSearchOptions.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
198
|
-
key: 1
|
|
201
|
+
default: withCtx(() => [_ctx.resolvedSearchOptions.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
202
|
+
key: 0
|
|
199
203
|
}, [_ctx.groupByFunction ? (openBlock(true), createElementBlock(Fragment, {
|
|
200
204
|
key: 0
|
|
201
205
|
}, renderList(_ctx.groupedOptions, (group, groupName) => {
|
|
@@ -214,7 +218,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
214
218
|
option: option
|
|
215
219
|
}, () => [createVNode(_component_OrCheckbox, {
|
|
216
220
|
modelValue: _ctx.proxyModelValue,
|
|
217
|
-
"onUpdate:modelValue": _cache[
|
|
221
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => _ctx.proxyModelValue = $event),
|
|
218
222
|
value: option.value,
|
|
219
223
|
label: option.label,
|
|
220
224
|
"label-variant": 'input'
|
|
@@ -252,7 +256,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
252
256
|
}, {
|
|
253
257
|
default: withCtx(() => [createVNode(_component_OrCheckbox, {
|
|
254
258
|
modelValue: _ctx.proxyModelValue,
|
|
255
|
-
"onUpdate:modelValue": _cache[
|
|
259
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.proxyModelValue = $event),
|
|
256
260
|
value: option.value,
|
|
257
261
|
label: option.label,
|
|
258
262
|
"label-variant": 'input'
|
|
@@ -283,7 +287,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
283
287
|
_: 2 /* DYNAMIC */
|
|
284
288
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
285
289
|
}), 128 /* KEYED_FRAGMENT */))], 64 /* STABLE_FRAGMENT */))], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock("div", {
|
|
286
|
-
key:
|
|
290
|
+
key: 1,
|
|
287
291
|
class: normalizeClass(_ctx.noSearchResultsStyles)
|
|
288
292
|
}, [renderSlot(_ctx.$slots, "noSearchResultsTemplate", {}, () => [createTextVNode(" No results ")])], 2 /* CLASS */))]),
|
|
289
293
|
|
|
@@ -76,6 +76,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
76
76
|
popoverState: import("vue-demi").ComputedRef<any>;
|
|
77
77
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
78
78
|
controlStyles: import("vue-demi").ComputedRef<string[]>;
|
|
79
|
+
searchControlStyles: import("vue-demi").ComputedRef<string[]>;
|
|
79
80
|
placeholderStyles: import("vue-demi").ComputedRef<string[]>;
|
|
80
81
|
dropdownStyles: import("vue-demi").ComputedRef<string[]>;
|
|
81
82
|
noSearchResultsStyles: import("vue-demi").ComputedRef<string[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrSelectV3 } from '../../OrSelect.vue_vue_type_script_lang-
|
|
1
|
+
export { s as OrSelectV3 } from '../../OrSelect.vue_vue_type_script_lang-c70d3f4e.js';
|
|
2
2
|
export { InputBoxSize as SelectSize } from '../OrInputBoxV3/props.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../utils/isEmptyValue.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SelectRoot: string[];
|
|
2
2
|
export declare const SelectControl: string[];
|
|
3
|
+
export declare const SelectSearchControl: string[];
|
|
3
4
|
export declare const SelectPlaceholder: string[];
|
|
4
5
|
export declare const SelectDropdown: string[];
|
|
5
6
|
export declare const SelectDropdownDefault: string[];
|
|
@@ -14,6 +14,11 @@ const SelectControl = [
|
|
|
14
14
|
'gap-xs',
|
|
15
15
|
// Typography
|
|
16
16
|
'typography-inherit'];
|
|
17
|
+
const SelectSearchControl = [
|
|
18
|
+
// Box
|
|
19
|
+
'w-full',
|
|
20
|
+
// Spacing
|
|
21
|
+
'!mx-none', '!my-none'];
|
|
17
22
|
const SelectPlaceholder = [
|
|
18
23
|
// Theme
|
|
19
24
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
@@ -48,4 +53,4 @@ const SelectNoSearchResults = [
|
|
|
48
53
|
// Theme
|
|
49
54
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
|
|
50
55
|
|
|
51
|
-
export { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot };
|
|
56
|
+
export { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot, SelectSearchControl };
|
|
@@ -114,7 +114,7 @@ export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-8c2943c2.j
|
|
|
114
114
|
export { s as OrSegmentedControlV3 } from '../OrSegmentedControl.vue_vue_type_script_lang-3a7df112.js';
|
|
115
115
|
export { SegmentedControlSize } from './OrSegmentedControlV3/props.js';
|
|
116
116
|
export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-b8b014f6.js';
|
|
117
|
-
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-
|
|
117
|
+
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-c70d3f4e.js';
|
|
118
118
|
export { s as OrSidebar } from '../OrSidebar.vue_vue_type_script_lang-cac8e5b7.js';
|
|
119
119
|
export { OrSidebarSide } from './OrSidebar/constants.js';
|
|
120
120
|
export { s as OrSidebarV3 } from '../OrSidebar.vue_vue_type_script_lang-a79c5901.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -76,7 +76,7 @@ export { s as OrSegmentedControlV3 } from './OrSegmentedControl.vue_vue_type_scr
|
|
|
76
76
|
import './components/OrSelect/OrSelect.js';
|
|
77
77
|
export { s as OrSelect } from './OrSelect.vue_vue_type_script_lang-b8b014f6.js';
|
|
78
78
|
import './components/OrSelectV3/OrSelect.js';
|
|
79
|
-
export { s as OrSelectV3 } from './OrSelect.vue_vue_type_script_lang-
|
|
79
|
+
export { s as OrSelectV3 } from './OrSelect.vue_vue_type_script_lang-c70d3f4e.js';
|
|
80
80
|
import './components/OrSidebar/OrSidebar.js';
|
|
81
81
|
export { s as OrSidebar } from './OrSidebar.vue_vue_type_script_lang-cac8e5b7.js';
|
|
82
82
|
import './components/OrSidebarV3/OrSidebar.js';
|
|
@@ -36,6 +36,11 @@ const SelectControl = [
|
|
|
36
36
|
'gap-xs',
|
|
37
37
|
// Typography
|
|
38
38
|
'typography-inherit'];
|
|
39
|
+
const SelectSearchControl = [
|
|
40
|
+
// Box
|
|
41
|
+
'w-full',
|
|
42
|
+
// Spacing
|
|
43
|
+
'!mx-none', '!my-none'];
|
|
39
44
|
const SelectPlaceholder = [
|
|
40
45
|
// Theme
|
|
41
46
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
@@ -192,6 +197,7 @@ var script = defineComponent({
|
|
|
192
197
|
// Styles
|
|
193
198
|
const rootStyles = computed(() => ['or-select-v3', ...SelectRoot]);
|
|
194
199
|
const controlStyles = computed(() => [...SelectControl]);
|
|
200
|
+
const searchControlStyles = computed(() => [...SelectSearchControl]);
|
|
195
201
|
const placeholderStyles = computed(() => [...SelectPlaceholder]);
|
|
196
202
|
const dropdownStyles = computed(() => {
|
|
197
203
|
var _a;
|
|
@@ -287,6 +293,7 @@ var script = defineComponent({
|
|
|
287
293
|
popoverState,
|
|
288
294
|
rootStyles,
|
|
289
295
|
controlStyles,
|
|
296
|
+
searchControlStyles,
|
|
290
297
|
placeholderStyles,
|
|
291
298
|
dropdownStyles,
|
|
292
299
|
noSearchResultsStyles,
|
|
@@ -354,7 +361,27 @@ var __vue_render__ = function () {
|
|
|
354
361
|
"readonly": _vm.readonly,
|
|
355
362
|
"disabled": _vm.disabled
|
|
356
363
|
}
|
|
357
|
-
}, [_c('
|
|
364
|
+
}, [_vm.popoverState === 'open' && _vm.enableSearch ? [_c('OrInput', {
|
|
365
|
+
class: _vm.searchControlStyles,
|
|
366
|
+
attrs: {
|
|
367
|
+
"type": 'search',
|
|
368
|
+
"placeholder": 'Search',
|
|
369
|
+
"size": _vm.size,
|
|
370
|
+
"disable-default-styles": true
|
|
371
|
+
},
|
|
372
|
+
on: {
|
|
373
|
+
"click": function ($event) {
|
|
374
|
+
$event.stopPropagation();
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
model: {
|
|
378
|
+
value: _vm.searchText,
|
|
379
|
+
callback: function ($$v) {
|
|
380
|
+
_vm.searchText = $$v;
|
|
381
|
+
},
|
|
382
|
+
expression: "searchText"
|
|
383
|
+
}
|
|
384
|
+
})] : [_c('div', {
|
|
358
385
|
ref: "control",
|
|
359
386
|
class: _vm.controlStyles,
|
|
360
387
|
attrs: {
|
|
@@ -371,9 +398,9 @@ var __vue_render__ = function () {
|
|
|
371
398
|
}
|
|
372
399
|
}
|
|
373
400
|
}, [_vm.multiple ? [_vm.proxyModelValue && _vm.proxyModelValue.length > 0 ? [_vm._t("valueTemplate", function () {
|
|
374
|
-
return _vm._l(_vm.selection, function (option
|
|
401
|
+
return _vm._l(_vm.selection, function (option) {
|
|
375
402
|
return _c('OrTag', {
|
|
376
|
-
key:
|
|
403
|
+
key: option.value,
|
|
377
404
|
attrs: {
|
|
378
405
|
"variant": 'reset',
|
|
379
406
|
"disabled": _vm.disabled || _vm.readonly
|
|
@@ -383,7 +410,7 @@ var __vue_render__ = function () {
|
|
|
383
410
|
return _vm.deselect(option);
|
|
384
411
|
}
|
|
385
412
|
}
|
|
386
|
-
}, [_vm._v("\n
|
|
413
|
+
}, [_vm._v("\n " + _vm._s(option.label) + "\n ")]);
|
|
387
414
|
});
|
|
388
415
|
}, {
|
|
389
416
|
"model": _vm.proxyModelValue
|
|
@@ -392,12 +419,12 @@ var __vue_render__ = function () {
|
|
|
392
419
|
}, [_vm._v(_vm._s(_vm.placeholder))])]] : [!_vm.isEmptyModelValue ? [_vm._t("valueTemplate", function () {
|
|
393
420
|
return [_c('span', {
|
|
394
421
|
staticClass: "truncate"
|
|
395
|
-
}, [_vm._v("\n
|
|
422
|
+
}, [_vm._v("\n " + _vm._s(_vm.selection.label) + "\n ")])];
|
|
396
423
|
}, {
|
|
397
424
|
"model": _vm.proxyModelValue
|
|
398
425
|
})] : [_c('span', {
|
|
399
426
|
class: _vm.placeholderStyles
|
|
400
|
-
}, [_vm._v(_vm._s(_vm.placeholder))])]]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n
|
|
427
|
+
}, [_vm._v(_vm._s(_vm.placeholder))])]]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n +" + _vm._s(_vm.outerItems.length) + "\n ")] : _vm._e(), _vm._v(" "), _c('div', {
|
|
401
428
|
class: ['layout-inline-row', 'gap-sm']
|
|
402
429
|
}, [!_vm.multiple && _vm.proxyModelValue ? [_c('OrIconButton', {
|
|
403
430
|
attrs: {
|
|
@@ -416,7 +443,7 @@ var __vue_render__ = function () {
|
|
|
416
443
|
"icon": _vm.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
|
|
417
444
|
"variant": 'outlined'
|
|
418
445
|
}
|
|
419
|
-
})], 2), _vm._v(" "), _c('OrPopover', {
|
|
446
|
+
})], 2)], _vm._v(" "), _c('OrPopover', {
|
|
420
447
|
ref: "popover",
|
|
421
448
|
attrs: {
|
|
422
449
|
"variant": 'auto',
|
|
@@ -426,21 +453,7 @@ var __vue_render__ = function () {
|
|
|
426
453
|
"custom-styles": _vm.dropdownStyles,
|
|
427
454
|
"disable-default-styles": true
|
|
428
455
|
}
|
|
429
|
-
}, [_vm.
|
|
430
|
-
attrs: {
|
|
431
|
-
"type": 'search',
|
|
432
|
-
"placeholder": 'Search',
|
|
433
|
-
"size": 's',
|
|
434
|
-
"disable-default-styles": true
|
|
435
|
-
},
|
|
436
|
-
model: {
|
|
437
|
-
value: _vm.searchText,
|
|
438
|
-
callback: function ($$v) {
|
|
439
|
-
_vm.searchText = $$v;
|
|
440
|
-
},
|
|
441
|
-
expression: "searchText"
|
|
442
|
-
}
|
|
443
|
-
})] : _vm._e(), _vm._v(" "), _vm.resolvedSearchOptions.length > 0 ? [_vm.groupByFunction ? _vm._l(_vm.groupedOptions, function (group, groupName) {
|
|
456
|
+
}, [_vm.resolvedSearchOptions.length > 0 ? [_vm.groupByFunction ? _vm._l(_vm.groupedOptions, function (group, groupName) {
|
|
444
457
|
return _c('OrExpansionPanel', {
|
|
445
458
|
key: groupName,
|
|
446
459
|
attrs: {
|
|
@@ -78,7 +78,7 @@ export { _ as OrSearch } from '../OrSearch-e2941d35.js';
|
|
|
78
78
|
export { _ as OrSearchV3 } from '../OrSearch-07d9774c.js';
|
|
79
79
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-d4e32f80.js';
|
|
80
80
|
export { _ as OrSelect } from '../OrSelect-49239b74.js';
|
|
81
|
-
export { _ as OrSelectV3 } from '../OrSelect-
|
|
81
|
+
export { _ as OrSelectV3 } from '../OrSelect-5b9b51e3.js';
|
|
82
82
|
export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-c56a9221.js';
|
|
83
83
|
export { _ as OrSidebarV3 } from '../OrSidebar-41c869c1.js';
|
|
84
84
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-0d2e41c8.js';
|
|
@@ -19,6 +19,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
19
19
|
popoverState: import("@vue/composition-api").ComputedRef<undefined>;
|
|
20
20
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
21
21
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
22
|
+
searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
22
23
|
placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
23
24
|
dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
24
25
|
noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
@@ -206,6 +207,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
206
207
|
popoverState: import("@vue/composition-api").ComputedRef<undefined>;
|
|
207
208
|
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
208
209
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
210
|
+
searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
209
211
|
placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
210
212
|
dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
211
213
|
noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { _ as OrSelectV3 } from '../../OrSelect-
|
|
1
|
+
export { _ as OrSelectV3 } from '../../OrSelect-5b9b51e3.js';
|
|
2
2
|
export { I as SelectSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-1715021a.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../dropdown-open-e1f90e0a.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SelectRoot: string[];
|
|
2
2
|
export declare const SelectControl: string[];
|
|
3
|
+
export declare const SelectSearchControl: string[];
|
|
3
4
|
export declare const SelectPlaceholder: string[];
|
|
4
5
|
export declare const SelectDropdown: string[];
|
|
5
6
|
export declare const SelectDropdownDefault: string[];
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export { _ as OrSearch } from './OrSearch-e2941d35.js';
|
|
|
78
78
|
export { _ as OrSearchV3 } from './OrSearch-07d9774c.js';
|
|
79
79
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-d4e32f80.js';
|
|
80
80
|
export { _ as OrSelect } from './OrSelect-49239b74.js';
|
|
81
|
-
export { _ as OrSelectV3 } from './OrSelect-
|
|
81
|
+
export { _ as OrSelectV3 } from './OrSelect-5b9b51e3.js';
|
|
82
82
|
export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-c56a9221.js';
|
|
83
83
|
export { _ as OrSidebarV3 } from './OrSidebar-41c869c1.js';
|
|
84
84
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-0d2e41c8.js';
|
|
@@ -17,7 +17,7 @@ import { s as script$9 } from './OrLabel-4da56db0.js';
|
|
|
17
17
|
import { s as script$a } from './OrMenuItem-54062d59.js';
|
|
18
18
|
import { s as script$b } from './OrPopover-94dc1203.js';
|
|
19
19
|
import { s as script$c } from './OrTag-d882091d.js';
|
|
20
|
-
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives,
|
|
20
|
+
import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, withModifiers, Fragment, createElementVNode, renderList, createVNode, vShow } from 'vue';
|
|
21
21
|
|
|
22
22
|
const SelectRoot = [
|
|
23
23
|
// Layout
|
|
@@ -35,6 +35,11 @@ const SelectControl = [
|
|
|
35
35
|
'gap-xs',
|
|
36
36
|
// Typography
|
|
37
37
|
'typography-inherit'];
|
|
38
|
+
const SelectSearchControl = [
|
|
39
|
+
// Box
|
|
40
|
+
'w-full',
|
|
41
|
+
// Spacing
|
|
42
|
+
'!mx-none', '!my-none'];
|
|
38
43
|
const SelectPlaceholder = [
|
|
39
44
|
// Theme
|
|
40
45
|
'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
|
|
@@ -191,6 +196,7 @@ var script = defineComponent({
|
|
|
191
196
|
// Styles
|
|
192
197
|
const rootStyles = computed(() => ['or-select-v3', ...SelectRoot]);
|
|
193
198
|
const controlStyles = computed(() => [...SelectControl]);
|
|
199
|
+
const searchControlStyles = computed(() => [...SelectSearchControl]);
|
|
194
200
|
const placeholderStyles = computed(() => [...SelectPlaceholder]);
|
|
195
201
|
const dropdownStyles = computed(() => {
|
|
196
202
|
var _a;
|
|
@@ -286,6 +292,7 @@ var script = defineComponent({
|
|
|
286
292
|
popoverState,
|
|
287
293
|
rootStyles,
|
|
288
294
|
controlStyles,
|
|
295
|
+
searchControlStyles,
|
|
289
296
|
placeholderStyles,
|
|
290
297
|
dropdownStyles,
|
|
291
298
|
noSearchResultsStyles,
|
|
@@ -322,10 +329,10 @@ const _hoisted_5 = {
|
|
|
322
329
|
};
|
|
323
330
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
324
331
|
const _component_OrLabel = resolveComponent("OrLabel");
|
|
332
|
+
const _component_OrInput = resolveComponent("OrInput");
|
|
325
333
|
const _component_OrTag = resolveComponent("OrTag");
|
|
326
334
|
const _component_OrIconButton = resolveComponent("OrIconButton");
|
|
327
335
|
const _component_OrIcon = resolveComponent("OrIcon");
|
|
328
|
-
const _component_OrInput = resolveComponent("OrInput");
|
|
329
336
|
const _component_OrCheckbox = resolveComponent("OrCheckbox");
|
|
330
337
|
const _component_OrMenuItem = resolveComponent("OrMenuItem");
|
|
331
338
|
const _component_OrExpansionPanel = resolveComponent("OrExpansionPanel");
|
|
@@ -358,22 +365,34 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
358
365
|
readonly: _ctx.readonly,
|
|
359
366
|
disabled: _ctx.disabled
|
|
360
367
|
}, {
|
|
361
|
-
default: withCtx(() => [
|
|
368
|
+
default: withCtx(() => [_ctx.popoverState === 'open' && _ctx.enableSearch ? (openBlock(), createBlock(_component_OrInput, {
|
|
369
|
+
key: 0,
|
|
370
|
+
modelValue: _ctx.searchText,
|
|
371
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.searchText = $event),
|
|
372
|
+
class: normalizeClass(_ctx.searchControlStyles),
|
|
373
|
+
type: 'search',
|
|
374
|
+
placeholder: 'Search',
|
|
375
|
+
size: _ctx.size,
|
|
376
|
+
"disable-default-styles": true,
|
|
377
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
|
|
378
|
+
}, null, 8 /* PROPS */, ["modelValue", "class", "size"])) : (openBlock(), createElementBlock(Fragment, {
|
|
379
|
+
key: 1
|
|
380
|
+
}, [createElementVNode("div", {
|
|
362
381
|
id: _ctx.controlId,
|
|
363
382
|
ref: "control",
|
|
364
383
|
class: normalizeClass(_ctx.controlStyles),
|
|
365
384
|
tabindex: !_ctx.disabled ? 0 : null,
|
|
366
385
|
disabled: _ctx.disabled,
|
|
367
|
-
onFocus: _cache[
|
|
368
|
-
onBlur: _cache[
|
|
386
|
+
onFocus: _cache[2] || (_cache[2] = $event => _ctx.$emit('focus', $event)),
|
|
387
|
+
onBlur: _cache[3] || (_cache[3] = $event => _ctx.$emit('blur', $event))
|
|
369
388
|
}, [_ctx.multiple ? (openBlock(), createElementBlock(Fragment, {
|
|
370
389
|
key: 0
|
|
371
390
|
}, [_ctx.proxyModelValue && _ctx.proxyModelValue.length > 0 ? renderSlot(_ctx.$slots, "valueTemplate", {
|
|
372
391
|
key: 0,
|
|
373
392
|
model: _ctx.proxyModelValue
|
|
374
|
-
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection,
|
|
393
|
+
}, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection, option => {
|
|
375
394
|
return openBlock(), createBlock(_component_OrTag, {
|
|
376
|
-
key:
|
|
395
|
+
key: option.value,
|
|
377
396
|
variant: 'reset',
|
|
378
397
|
disabled: _ctx.disabled || _ctx.readonly,
|
|
379
398
|
onReset: $event => _ctx.deselect(option)
|
|
@@ -390,7 +409,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
390
409
|
}, [!_ctx.isEmptyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
|
|
391
410
|
key: 0,
|
|
392
411
|
model: _ctx.proxyModelValue
|
|
393
|
-
}, () => [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.selection
|
|
412
|
+
}, () => [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.selection.label), 1 /* TEXT */)]) : (openBlock(), createElementBlock("span", {
|
|
394
413
|
key: 1,
|
|
395
414
|
class: normalizeClass(_ctx.placeholderStyles)
|
|
396
415
|
}, toDisplayString(_ctx.placeholder), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
@@ -400,11 +419,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
400
419
|
icon: 'close',
|
|
401
420
|
color: 'inherit',
|
|
402
421
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
403
|
-
onClick: _cache[
|
|
422
|
+
onClick: _cache[4] || (_cache[4] = withModifiers($event => _ctx.$emit('update:modelValue', undefined), ["stop"]))
|
|
404
423
|
}, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrIcon, {
|
|
405
424
|
icon: _ctx.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
|
|
406
425
|
variant: 'outlined'
|
|
407
|
-
}, null, 8 /* PROPS */, ["icon"])]), createVNode(_component_OrPopover, {
|
|
426
|
+
}, null, 8 /* PROPS */, ["icon"])])], 64 /* STABLE_FRAGMENT */)), createVNode(_component_OrPopover, {
|
|
408
427
|
ref: "popover",
|
|
409
428
|
variant: 'auto',
|
|
410
429
|
trigger: _ctx.inputBoxRoot,
|
|
@@ -413,16 +432,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
413
432
|
"custom-styles": _ctx.dropdownStyles,
|
|
414
433
|
"disable-default-styles": true
|
|
415
434
|
}, {
|
|
416
|
-
default: withCtx(() => [_ctx.
|
|
417
|
-
key: 0
|
|
418
|
-
modelValue: _ctx.searchText,
|
|
419
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => _ctx.searchText = $event),
|
|
420
|
-
type: 'search',
|
|
421
|
-
placeholder: 'Search',
|
|
422
|
-
size: 's',
|
|
423
|
-
"disable-default-styles": true
|
|
424
|
-
}, null, 8 /* PROPS */, ["modelValue"])) : createCommentVNode("v-if", true), _ctx.resolvedSearchOptions.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
425
|
-
key: 1
|
|
435
|
+
default: withCtx(() => [_ctx.resolvedSearchOptions.length > 0 ? (openBlock(), createElementBlock(Fragment, {
|
|
436
|
+
key: 0
|
|
426
437
|
}, [_ctx.groupByFunction ? (openBlock(true), createElementBlock(Fragment, {
|
|
427
438
|
key: 0
|
|
428
439
|
}, renderList(_ctx.groupedOptions, (group, groupName) => {
|
|
@@ -441,7 +452,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
441
452
|
option: option
|
|
442
453
|
}, () => [createVNode(_component_OrCheckbox, {
|
|
443
454
|
modelValue: _ctx.proxyModelValue,
|
|
444
|
-
"onUpdate:modelValue": _cache[
|
|
455
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => _ctx.proxyModelValue = $event),
|
|
445
456
|
value: option.value,
|
|
446
457
|
label: option.label,
|
|
447
458
|
"label-variant": 'input'
|
|
@@ -479,7 +490,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
479
490
|
}, {
|
|
480
491
|
default: withCtx(() => [createVNode(_component_OrCheckbox, {
|
|
481
492
|
modelValue: _ctx.proxyModelValue,
|
|
482
|
-
"onUpdate:modelValue": _cache[
|
|
493
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.proxyModelValue = $event),
|
|
483
494
|
value: option.value,
|
|
484
495
|
label: option.label,
|
|
485
496
|
"label-variant": 'input'
|
|
@@ -510,7 +521,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
510
521
|
_: 2 /* DYNAMIC */
|
|
511
522
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
|
|
512
523
|
}), 128 /* KEYED_FRAGMENT */))], 64 /* STABLE_FRAGMENT */))], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock("div", {
|
|
513
|
-
key:
|
|
524
|
+
key: 1,
|
|
514
525
|
class: normalizeClass(_ctx.noSearchResultsStyles)
|
|
515
526
|
}, [renderSlot(_ctx.$slots, "noSearchResultsTemplate", {}, () => [createTextVNode(" No results ")])], 2 /* CLASS */))]),
|
|
516
527
|
|
|
@@ -75,7 +75,7 @@ export { s as OrSearch } from '../OrSearch-d0c8aca7.js';
|
|
|
75
75
|
export { s as OrSearchV3 } from '../OrSearch-e268ceb2.js';
|
|
76
76
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-c8eb217d.js';
|
|
77
77
|
export { s as OrSelect } from '../OrSelect-60205145.js';
|
|
78
|
-
export { s as OrSelectV3 } from '../OrSelect-
|
|
78
|
+
export { s as OrSelectV3 } from '../OrSelect-97cccfd0.js';
|
|
79
79
|
export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-aaf73310.js';
|
|
80
80
|
export { s as OrSidebarV3 } from '../OrSidebar-fadc2431.js';
|
|
81
81
|
export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-e0cbeaa5.js';
|
|
@@ -76,6 +76,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
76
76
|
popoverState: import("vue-demi").ComputedRef<any>;
|
|
77
77
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
78
78
|
controlStyles: import("vue-demi").ComputedRef<string[]>;
|
|
79
|
+
searchControlStyles: import("vue-demi").ComputedRef<string[]>;
|
|
79
80
|
placeholderStyles: import("vue-demi").ComputedRef<string[]>;
|
|
80
81
|
dropdownStyles: import("vue-demi").ComputedRef<string[]>;
|
|
81
82
|
noSearchResultsStyles: import("vue-demi").ComputedRef<string[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SelectRoot: string[];
|
|
2
2
|
export declare const SelectControl: string[];
|
|
3
|
+
export declare const SelectSearchControl: string[];
|
|
3
4
|
export declare const SelectPlaceholder: string[];
|
|
4
5
|
export declare const SelectDropdown: string[];
|
|
5
6
|
export declare const SelectDropdownDefault: string[];
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -75,7 +75,7 @@ export { s as OrSearch } from './OrSearch-d0c8aca7.js';
|
|
|
75
75
|
export { s as OrSearchV3 } from './OrSearch-e268ceb2.js';
|
|
76
76
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-c8eb217d.js';
|
|
77
77
|
export { s as OrSelect } from './OrSelect-60205145.js';
|
|
78
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
78
|
+
export { s as OrSelectV3 } from './OrSelect-97cccfd0.js';
|
|
79
79
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-aaf73310.js';
|
|
80
80
|
export { s as OrSidebarV3 } from './OrSidebar-fadc2431.js';
|
|
81
81
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-e0cbeaa5.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.3-beta.3053.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -153,6 +153,5 @@
|
|
|
153
153
|
"default": "./dist/bundled/v3/components/*/index.js"
|
|
154
154
|
},
|
|
155
155
|
"./package.json": "./package.json"
|
|
156
|
-
}
|
|
157
|
-
"gitHead": "667546ace3a445e5e0bb0193d617c7214fa1471a"
|
|
156
|
+
}
|
|
158
157
|
}
|
|
@@ -29,75 +29,89 @@
|
|
|
29
29
|
:readonly="readonly"
|
|
30
30
|
:disabled="disabled"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
<template v-if="popoverState === 'open' && enableSearch">
|
|
33
|
+
<OrInput
|
|
34
|
+
v-model="searchText"
|
|
35
|
+
:class="searchControlStyles"
|
|
36
|
+
:type="'search'"
|
|
37
|
+
:placeholder="'Search'"
|
|
38
|
+
:size="size"
|
|
39
|
+
:disable-default-styles="true"
|
|
40
|
+
@click.stop
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<template v-else>
|
|
45
|
+
<div
|
|
46
|
+
:id="controlId"
|
|
47
|
+
ref="control"
|
|
48
|
+
:class="controlStyles"
|
|
49
|
+
:tabindex="!disabled ? 0 : null"
|
|
50
|
+
:disabled="disabled"
|
|
51
|
+
@focus="$emit('focus', $event)"
|
|
52
|
+
@blur="$emit('blur', $event)"
|
|
53
|
+
>
|
|
54
|
+
<template v-if="multiple">
|
|
55
|
+
<template v-if="proxyModelValue && proxyModelValue.length > 0">
|
|
56
|
+
<slot
|
|
57
|
+
name="valueTemplate"
|
|
58
|
+
:model="proxyModelValue"
|
|
53
59
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
<OrTag
|
|
61
|
+
v-for="option in selection"
|
|
62
|
+
:key="option.value"
|
|
63
|
+
:variant="'reset'"
|
|
64
|
+
:disabled="disabled || readonly"
|
|
65
|
+
@reset="deselect(option)"
|
|
66
|
+
>
|
|
67
|
+
{{ option.label }}
|
|
68
|
+
</OrTag>
|
|
69
|
+
</slot>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<template v-else>
|
|
73
|
+
<span :class="placeholderStyles">{{ placeholder }}</span>
|
|
74
|
+
</template>
|
|
57
75
|
</template>
|
|
58
76
|
|
|
59
77
|
<template v-else>
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
<template v-if="!isEmptyModelValue">
|
|
79
|
+
<slot
|
|
80
|
+
name="valueTemplate"
|
|
81
|
+
:model="proxyModelValue"
|
|
82
|
+
>
|
|
83
|
+
<span class="truncate">
|
|
84
|
+
{{ selection.label }}
|
|
85
|
+
</span>
|
|
86
|
+
</slot>
|
|
87
|
+
</template>
|
|
63
88
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
name="valueTemplate"
|
|
68
|
-
:model="proxyModelValue"
|
|
69
|
-
>
|
|
70
|
-
<span class="truncate">
|
|
71
|
-
{{ selection && selection.label }}
|
|
72
|
-
</span>
|
|
73
|
-
</slot>
|
|
89
|
+
<template v-else>
|
|
90
|
+
<span :class="placeholderStyles">{{ placeholder }}</span>
|
|
91
|
+
</template>
|
|
74
92
|
</template>
|
|
93
|
+
</div>
|
|
75
94
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</template>
|
|
95
|
+
<template v-if="multiple && outerItems.length > 0">
|
|
96
|
+
+{{ outerItems.length }}
|
|
79
97
|
</template>
|
|
80
|
-
</div>
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
99
|
+
<div :class="['layout-inline-row', 'gap-sm']">
|
|
100
|
+
<template v-if="!multiple && proxyModelValue">
|
|
101
|
+
<OrIconButton
|
|
102
|
+
:icon="'close'"
|
|
103
|
+
:color="'inherit'"
|
|
104
|
+
:disabled="readonly || disabled"
|
|
105
|
+
@click.stop="$emit('update:modelValue', undefined)"
|
|
106
|
+
/>
|
|
107
|
+
</template>
|
|
85
108
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
:icon="'close'"
|
|
90
|
-
:color="'inherit'"
|
|
91
|
-
:disabled="readonly || disabled"
|
|
92
|
-
@click.stop="$emit('update:modelValue', undefined)"
|
|
109
|
+
<OrIcon
|
|
110
|
+
:icon="popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'"
|
|
111
|
+
:variant="'outlined'"
|
|
93
112
|
/>
|
|
94
|
-
</
|
|
95
|
-
|
|
96
|
-
<OrIcon
|
|
97
|
-
:icon="popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down'"
|
|
98
|
-
:variant="'outlined'"
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
101
115
|
|
|
102
116
|
<OrPopover
|
|
103
117
|
ref="popover"
|
|
@@ -108,16 +122,6 @@
|
|
|
108
122
|
:custom-styles="dropdownStyles"
|
|
109
123
|
:disable-default-styles="true"
|
|
110
124
|
>
|
|
111
|
-
<template v-if="enableSearch">
|
|
112
|
-
<OrInput
|
|
113
|
-
v-model="searchText"
|
|
114
|
-
:type="'search'"
|
|
115
|
-
:placeholder="'Search'"
|
|
116
|
-
:size="'s'"
|
|
117
|
-
:disable-default-styles="true"
|
|
118
|
-
/>
|
|
119
|
-
</template>
|
|
120
|
-
|
|
121
125
|
<template v-if="resolvedSearchOptions.length > 0">
|
|
122
126
|
<template v-if="groupByFunction">
|
|
123
127
|
<OrExpansionPanel
|
|
@@ -252,7 +256,7 @@ import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
|
|
|
252
256
|
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
253
257
|
import { OrTagV3 as OrTag } from '../or-tag-v3';
|
|
254
258
|
import { SelectSize } from './props';
|
|
255
|
-
import { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot } from './styles';
|
|
259
|
+
import { SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectNoSearchResults, SelectPlaceholder, SelectRoot, SelectSearchControl } from './styles';
|
|
256
260
|
import { SelectGroupByFunction, SelectOption, SelectSearchFunction } from './types';
|
|
257
261
|
|
|
258
262
|
export default defineComponent({
|
|
@@ -406,6 +410,10 @@ export default defineComponent({
|
|
|
406
410
|
...SelectControl,
|
|
407
411
|
]);
|
|
408
412
|
|
|
413
|
+
const searchControlStyles = computed(() => [
|
|
414
|
+
...SelectSearchControl,
|
|
415
|
+
]);
|
|
416
|
+
|
|
409
417
|
const placeholderStyles = computed(() => [
|
|
410
418
|
...SelectPlaceholder,
|
|
411
419
|
]);
|
|
@@ -533,6 +541,7 @@ export default defineComponent({
|
|
|
533
541
|
popoverState,
|
|
534
542
|
rootStyles,
|
|
535
543
|
controlStyles,
|
|
544
|
+
searchControlStyles,
|
|
536
545
|
placeholderStyles,
|
|
537
546
|
dropdownStyles,
|
|
538
547
|
noSearchResultsStyles,
|
|
@@ -23,6 +23,15 @@ export const SelectControl: string[] = [
|
|
|
23
23
|
'typography-inherit',
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
+
export const SelectSearchControl: string[] = [
|
|
27
|
+
// Box
|
|
28
|
+
'w-full',
|
|
29
|
+
|
|
30
|
+
// Spacing
|
|
31
|
+
'!mx-none',
|
|
32
|
+
'!my-none',
|
|
33
|
+
];
|
|
34
|
+
|
|
26
35
|
export const SelectPlaceholder: string[] = [
|
|
27
36
|
// Theme
|
|
28
37
|
'theme-foreground-outline',
|