@onereach/ui-components 5.0.2-beta.3150.0 → 5.0.2-beta.3152.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.
@@ -29,7 +29,9 @@ const Select = [
29
29
  'gap-xs'];
30
30
  const SelectControl = [
31
31
  // Layout
32
- 'layout-row grow',
32
+ 'layout-row',
33
+ // Layout (empty)
34
+ 'empty:hidden',
33
35
  // Overflow
34
36
  'overflow-hidden',
35
37
  // Spacing
@@ -202,9 +204,7 @@ var script = defineComponent({
202
204
  // Styles
203
205
  const rootStyles = computed(() => ['or-select-v3', ...Select]);
204
206
  const controlStyles = computed(() => [...SelectControl]);
205
- const searchControlStyles = computed(() => [...SelectSearchControl, '!visible' // Search control is always visible despite `useOverflow` effects
206
- ]);
207
-
207
+ const searchControlStyles = computed(() => [...SelectSearchControl]);
208
208
  const placeholderStyles = computed(() => [...SelectPlaceholder]);
209
209
  const dropdownStyles = computed(() => {
210
210
  var _a;
@@ -421,56 +421,25 @@ var __vue_render__ = function () {
421
421
  });
422
422
  }, {
423
423
  "model": _vm.proxyModelValue
424
- }), _vm._v(" "), _vm.popoverState === 'open' && _vm.enableSearch && _vm.isDesktop ? [_c('OrInput', {
425
- ref: "searchControl",
426
- class: _vm.searchControlStyles,
427
- attrs: {
428
- "type": 'search',
429
- "placeholder": _vm.placeholder,
430
- "size": _vm.size,
431
- "disable-default-styles": true
432
- },
433
- on: {
434
- "click": function ($event) {
435
- $event.stopPropagation();
436
- }
437
- },
438
- model: {
439
- value: _vm.searchText,
440
- callback: function ($$v) {
441
- _vm.searchText = $$v;
442
- },
443
- expression: "searchText"
444
- }
445
- })] : _vm._e()] : [_vm.popoverState === 'open' && _vm.enableSearch && _vm.isDesktop ? [_c('OrInput', {
446
- ref: "searchControl",
447
- class: _vm.searchControlStyles,
424
+ })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('span', {
425
+ class: _vm.placeholderStyles,
448
426
  attrs: {
449
- "type": 'search',
450
- "placeholder": _vm.placeholder,
451
- "size": _vm.size,
452
- "disable-default-styles": true
453
- },
454
- on: {
455
- "click": function ($event) {
456
- $event.stopPropagation();
457
- }
458
- },
459
- model: {
460
- value: _vm.searchText,
461
- callback: function ($$v) {
462
- _vm.searchText = $$v;
463
- },
464
- expression: "searchText"
427
+ "disabled": _vm.disabled ? '' : null
465
428
  }
466
- })] : [_c('span', {
429
+ }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : _vm._e()] : [!_vm.isEmptyModelValue ? [_vm._t("valueTemplate", function () {
430
+ return [_c('span', {
431
+ staticClass: "truncate"
432
+ }, [_vm._v("\n " + _vm._s(_vm.selection && _vm.selection.label) + "\n ")])];
433
+ }, {
434
+ "model": _vm.proxyModelValue
435
+ })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('span', {
467
436
  class: _vm.placeholderStyles,
468
437
  attrs: {
469
438
  "disabled": _vm.disabled ? '' : null
470
439
  }
471
- }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])]]] : [_vm.popoverState === 'open' && _vm.enableSearch && _vm.isDesktop ? [_c('OrInput', {
440
+ }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : _vm._e()]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n +" + _vm._s(_vm.outerItems.length) + "\n ")] : _vm._e(), _vm._v(" "), _vm.popoverState === 'open' && _vm.enableSearch && _vm.isDesktop ? [_c('OrInput', {
472
441
  ref: "searchControl",
473
- class: _vm.searchControlStyles,
442
+ class: _vm.searchControlStyles.concat([_vm.isEmptyModelValue && 'md:!ml-none']),
474
443
  attrs: {
475
444
  "type": 'search',
476
445
  "placeholder": _vm.placeholder,
@@ -489,20 +458,11 @@ var __vue_render__ = function () {
489
458
  },
490
459
  expression: "searchText"
491
460
  }
492
- })] : [!_vm.isEmptyModelValue ? [_vm._t("valueTemplate", function () {
493
- return [_c('span', {
494
- staticClass: "truncate"
495
- }, [_vm._v("\n " + _vm._s(_vm.selection && _vm.selection.label) + "\n ")])];
496
- }, {
497
- "model": _vm.proxyModelValue
498
- })] : [_c('span', {
499
- class: _vm.placeholderStyles,
500
- attrs: {
501
- "disabled": _vm.disabled ? '' : null
502
- }
503
- }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])]]]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n +" + _vm._s(_vm.outerItems.length) + "\n ")] : _vm._e(), _vm._v(" "), _c('div', {
461
+ })] : [_c('div', {
462
+ class: ['grow']
463
+ })], _vm._v(" "), _c('div', {
504
464
  class: ['layout-inline-row', 'gap-sm']
505
- }, [!_vm.isEmptyModelValue && _vm.popoverState === 'closed' ? [_c('OrIconButton', {
465
+ }, [_vm.popoverState === 'closed' && !_vm.isEmptyModelValue ? [_c('OrIconButton', {
506
466
  attrs: {
507
467
  "icon": 'close',
508
468
  "color": 'inherit',
@@ -78,7 +78,7 @@ export { _ as OrSearch } from '../OrSearch-ac542dd6.js';
78
78
  export { _ as OrSearchV3 } from '../OrSearch-598dee09.js';
79
79
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-d4e32f80.js';
80
80
  export { _ as OrSelect } from '../OrSelect-c0d04cf6.js';
81
- export { _ as OrSelectV3 } from '../OrSelect-7dcb6eb1.js';
81
+ export { _ as OrSelectV3 } from '../OrSelect-804d3352.js';
82
82
  export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-c56a9221.js';
83
83
  export { _ as OrSidebarV3 } from '../OrSidebar-0539d572.js';
84
84
  export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-8474d9c3.js';
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectV3 } from '../../OrSelect-7dcb6eb1.js';
1
+ export { _ as OrSelectV3 } from '../../OrSelect-804d3352.js';
2
2
  export { I as SelectSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-4fde9829.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-06d651cf.js';
@@ -78,7 +78,7 @@ export { _ as OrSearch } from './OrSearch-ac542dd6.js';
78
78
  export { _ as OrSearchV3 } from './OrSearch-598dee09.js';
79
79
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-d4e32f80.js';
80
80
  export { _ as OrSelect } from './OrSelect-c0d04cf6.js';
81
- export { _ as OrSelectV3 } from './OrSelect-7dcb6eb1.js';
81
+ export { _ as OrSelectV3 } from './OrSelect-804d3352.js';
82
82
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-c56a9221.js';
83
83
  export { _ as OrSidebarV3 } from './OrSidebar-0539d572.js';
84
84
  export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-8474d9c3.js';
@@ -28,7 +28,9 @@ const Select = [
28
28
  'gap-xs'];
29
29
  const SelectControl = [
30
30
  // Layout
31
- 'layout-row grow',
31
+ 'layout-row',
32
+ // Layout (empty)
33
+ 'empty:hidden',
32
34
  // Overflow
33
35
  'overflow-hidden',
34
36
  // Spacing
@@ -201,9 +203,7 @@ var script = defineComponent({
201
203
  // Styles
202
204
  const rootStyles = computed(() => ['or-select-v3', ...Select]);
203
205
  const controlStyles = computed(() => [...SelectControl]);
204
- const searchControlStyles = computed(() => [...SelectSearchControl, '!visible' // Search control is always visible despite `useOverflow` effects
205
- ]);
206
-
206
+ const searchControlStyles = computed(() => [...SelectSearchControl]);
207
207
  const placeholderStyles = computed(() => [...SelectPlaceholder]);
208
208
  const dropdownStyles = computed(() => {
209
209
  var _a;
@@ -348,14 +348,18 @@ const _hoisted_3 = {
348
348
  };
349
349
  const _hoisted_4 = ["disabled"];
350
350
  const _hoisted_5 = {
351
- class: /*#__PURE__*/normalizeClass(['layout-inline-row', 'gap-sm'])
351
+ key: 2,
352
+ class: /*#__PURE__*/normalizeClass(['grow'])
352
353
  };
353
354
  const _hoisted_6 = {
354
- class: /*#__PURE__*/normalizeClass(['contents'])
355
+ class: /*#__PURE__*/normalizeClass(['layout-inline-row', 'gap-sm'])
355
356
  };
356
357
  const _hoisted_7 = {
357
358
  class: /*#__PURE__*/normalizeClass(['contents'])
358
359
  };
360
+ const _hoisted_8 = {
361
+ class: /*#__PURE__*/normalizeClass(['contents'])
362
+ };
359
363
  function render(_ctx, _cache, $props, $setup, $data, $options) {
360
364
  const _component_OrLabel = resolveComponent("OrLabel");
361
365
  const _component_OrTag = resolveComponent("OrTag");
@@ -400,13 +404,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
400
404
  class: normalizeClass(_ctx.controlStyles),
401
405
  tabindex: !_ctx.disabled ? 0 : null,
402
406
  disabled: _ctx.disabled,
403
- onFocus: _cache[6] || (_cache[6] = $event => _ctx.$emit('focus', $event)),
404
- onBlur: _cache[7] || (_cache[7] = $event => _ctx.$emit('blur', $event))
407
+ onFocus: _cache[0] || (_cache[0] = $event => _ctx.$emit('focus', $event)),
408
+ onBlur: _cache[1] || (_cache[1] = $event => _ctx.$emit('blur', $event))
405
409
  }, [_ctx.multiple ? (openBlock(), createElementBlock(Fragment, {
406
410
  key: 0
407
- }, [!_ctx.isEmptyModelValue ? (openBlock(), createElementBlock(Fragment, {
408
- key: 0
409
- }, [renderSlot(_ctx.$slots, "valueTemplate", {
411
+ }, [!_ctx.isEmptyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
412
+ key: 0,
410
413
  model: _ctx.proxyModelValue
411
414
  }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection, option => {
412
415
  return openBlock(), createBlock(_component_OrTag, {
@@ -419,64 +422,38 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
419
422
 
420
423
  _: 2 /* DYNAMIC */
421
424
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "onReset"]);
422
- }), 128 /* KEYED_FRAGMENT */))]), _ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isDesktop ? (openBlock(), createBlock(_component_OrInput, {
423
- key: 0,
424
- ref: "searchControl",
425
- modelValue: _ctx.searchText,
426
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.searchText = $event),
427
- class: normalizeClass(_ctx.searchControlStyles),
428
- type: 'search',
429
- placeholder: _ctx.placeholder,
430
- size: _ctx.size,
431
- "disable-default-styles": true,
432
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop"]))
433
- }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock(Fragment, {
434
- key: 1
435
- }, [_ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isDesktop ? (openBlock(), createBlock(_component_OrInput, {
436
- key: 0,
437
- ref: "searchControl",
438
- modelValue: _ctx.searchText,
439
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.searchText = $event),
440
- class: normalizeClass(_ctx.searchControlStyles),
441
- type: 'search',
442
- placeholder: _ctx.placeholder,
443
- size: _ctx.size,
444
- "disable-default-styles": true,
445
- onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
446
- }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : (openBlock(), createElementBlock("span", {
425
+ }), 128 /* KEYED_FRAGMENT */))]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createElementBlock("span", {
447
426
  key: 1,
448
427
  class: normalizeClass(_ctx.placeholderStyles),
449
428
  disabled: _ctx.disabled ? '' : null
450
- }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_2))], 64 /* STABLE_FRAGMENT */))], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock(Fragment, {
451
- key: 1
452
- }, [_ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isDesktop ? (openBlock(), createBlock(_component_OrInput, {
453
- key: 0,
454
- ref: "searchControl",
455
- modelValue: _ctx.searchText,
456
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => _ctx.searchText = $event),
457
- class: normalizeClass(_ctx.searchControlStyles),
458
- type: 'search',
459
- placeholder: _ctx.placeholder,
460
- size: _ctx.size,
461
- "disable-default-styles": true,
462
- onClick: _cache[5] || (_cache[5] = withModifiers(() => {}, ["stop"]))
463
- }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : (openBlock(), createElementBlock(Fragment, {
429
+ }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_2)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock(Fragment, {
464
430
  key: 1
465
431
  }, [!_ctx.isEmptyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
466
432
  key: 0,
467
433
  model: _ctx.proxyModelValue
468
- }, () => [createElementVNode("span", _hoisted_3, toDisplayString(_ctx.selection && _ctx.selection.label), 1 /* TEXT */)]) : (openBlock(), createElementBlock("span", {
434
+ }, () => [createElementVNode("span", _hoisted_3, toDisplayString(_ctx.selection && _ctx.selection.label), 1 /* TEXT */)]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createElementBlock("span", {
469
435
  key: 1,
470
436
  class: normalizeClass(_ctx.placeholderStyles),
471
437
  disabled: _ctx.disabled ? '' : null
472
- }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_4))], 64 /* STABLE_FRAGMENT */))], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
438
+ }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_4)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
473
439
  key: 0
474
- }, [createTextVNode(" +" + toDisplayString(_ctx.outerItems.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_5, [!_ctx.isEmptyModelValue && _ctx.popoverState === 'closed' ? (openBlock(), createBlock(_component_OrIconButton, {
440
+ }, [createTextVNode(" +" + toDisplayString(_ctx.outerItems.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isDesktop ? (openBlock(), createBlock(_component_OrInput, {
441
+ key: 1,
442
+ ref: "searchControl",
443
+ modelValue: _ctx.searchText,
444
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.searchText = $event),
445
+ class: normalizeClass([..._ctx.searchControlStyles, _ctx.isEmptyModelValue && 'md:!ml-none']),
446
+ type: 'search',
447
+ placeholder: _ctx.placeholder,
448
+ size: _ctx.size,
449
+ "disable-default-styles": true,
450
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
451
+ }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : (openBlock(), createElementBlock("div", _hoisted_5)), createElementVNode("div", _hoisted_6, [_ctx.popoverState === 'closed' && !_ctx.isEmptyModelValue ? (openBlock(), createBlock(_component_OrIconButton, {
475
452
  key: 0,
476
453
  icon: 'close',
477
454
  color: 'inherit',
478
455
  disabled: _ctx.readonly || _ctx.disabled,
479
- onClick: _cache[8] || (_cache[8] = withModifiers($event => _ctx.$emit('update:modelValue', _ctx.multiple ? [] : undefined), ["stop"]))
456
+ onClick: _cache[4] || (_cache[4] = withModifiers($event => _ctx.$emit('update:modelValue', _ctx.multiple ? [] : undefined), ["stop"]))
480
457
  }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrIcon, {
481
458
  icon: _ctx.popoverState === 'open' ? 'arrow_drop_up' : 'arrow_drop_down',
482
459
  variant: 'outlined'
@@ -488,13 +465,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
488
465
  "full-width": true,
489
466
  "custom-styles": _ctx.dropdownStyles,
490
467
  "disable-default-styles": true,
491
- onClose: _cache[12] || (_cache[12] = $event => _ctx.clearSearchControl())
468
+ onClose: _cache[8] || (_cache[8] = $event => _ctx.clearSearchControl())
492
469
  }, {
493
470
  default: withCtx(() => [_ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isMobile ? (openBlock(), createBlock(_component_OrInput, {
494
471
  key: 0,
495
472
  ref: "searchControl",
496
473
  modelValue: _ctx.searchText,
497
- "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => _ctx.searchText = $event),
474
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => _ctx.searchText = $event),
498
475
  class: normalizeClass(_ctx.searchControlStyles),
499
476
  type: 'search',
500
477
  placeholder: _ctx.placeholder
@@ -519,7 +496,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
519
496
  option: option
520
497
  }, () => [createVNode(_component_OrCheckbox, {
521
498
  modelValue: _ctx.proxyModelValue,
522
- "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => _ctx.proxyModelValue = $event),
499
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.proxyModelValue = $event),
523
500
  value: option.value,
524
501
  label: option.label,
525
502
  "label-variant": 'menu-item'
@@ -560,7 +537,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
560
537
  }, {
561
538
  default: withCtx(() => [createVNode(_component_OrCheckbox, {
562
539
  modelValue: _ctx.proxyModelValue,
563
- "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => _ctx.proxyModelValue = $event),
540
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => _ctx.proxyModelValue = $event),
564
541
  value: option.value,
565
542
  label: option.label,
566
543
  "label-variant": 'menu-item'
@@ -600,14 +577,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
600
577
  _: 3 /* FORWARDED */
601
578
  }, 8 /* PROPS */, ["trigger", "custom-styles"])]),
602
579
  _: 3 /* FORWARDED */
603
- }, 8 /* PROPS */, ["class", "variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), withDirectives(createElementVNode("div", _hoisted_6, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
580
+ }, 8 /* PROPS */, ["class", "variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), withDirectives(createElementVNode("div", _hoisted_7, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
604
581
  key: 0,
605
582
  disabled: _ctx.disabled
606
583
  }, {
607
584
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
608
585
 
609
586
  _: 1 /* STABLE */
610
- }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_7, [createVNode(_component_OrError, {
587
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_8, [createVNode(_component_OrError, {
611
588
  disabled: _ctx.disabled
612
589
  }, {
613
590
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
@@ -75,7 +75,7 @@ export { s as OrSearch } from '../OrSearch-2800e9bf.js';
75
75
  export { s as OrSearchV3 } from '../OrSearch-998e4390.js';
76
76
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-c8eb217d.js';
77
77
  export { s as OrSelect } from '../OrSelect-9520d6e6.js';
78
- export { s as OrSelectV3 } from '../OrSelect-2af4a6eb.js';
78
+ export { s as OrSelectV3 } from '../OrSelect-268edd66.js';
79
79
  export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-aaf73310.js';
80
80
  export { s as OrSidebarV3 } from '../OrSidebar-d8e70813.js';
81
81
  export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-7a9f76cf.js';
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-2af4a6eb.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-268edd66.js';
2
2
  export { I as SelectSize } from '../../OrInputBox-912a6254.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-06d651cf.js';
@@ -75,7 +75,7 @@ export { s as OrSearch } from './OrSearch-2800e9bf.js';
75
75
  export { s as OrSearchV3 } from './OrSearch-998e4390.js';
76
76
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-c8eb217d.js';
77
77
  export { s as OrSelect } from './OrSelect-9520d6e6.js';
78
- export { s as OrSelectV3 } from './OrSelect-2af4a6eb.js';
78
+ export { s as OrSelectV3 } from './OrSelect-268edd66.js';
79
79
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-aaf73310.js';
80
80
  export { s as OrSidebarV3 } from './OrSidebar-d8e70813.js';
81
81
  export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-7a9f76cf.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "5.0.2-beta.3150.0",
3
+ "version": "5.0.2-beta.3152.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -54,80 +54,37 @@
54
54
  {{ option.label }}
55
55
  </OrTag>
56
56
  </slot>
57
-
58
- <template v-if="popoverState === 'open' && enableSearch && isDesktop">
59
- <OrInput
60
- ref="searchControl"
61
- v-model="searchText"
62
- :class="searchControlStyles"
63
- :type="'search'"
64
- :placeholder="placeholder"
65
- :size="size"
66
- :disable-default-styles="true"
67
- @click.stop
68
- />
69
- </template>
70
57
  </template>
71
58
 
72
- <template v-else>
73
- <template v-if="popoverState === 'open' && enableSearch && isDesktop">
74
- <OrInput
75
- ref="searchControl"
76
- v-model="searchText"
77
- :class="searchControlStyles"
78
- :type="'search'"
79
- :placeholder="placeholder"
80
- :size="size"
81
- :disable-default-styles="true"
82
- @click.stop
83
- />
84
- </template>
85
-
86
- <template v-else>
87
- <span
88
- :class="placeholderStyles"
89
- :disabled="disabled ? '' : null"
90
- >
91
- {{ placeholder }}
92
- </span>
93
- </template>
59
+ <template v-else-if="popoverState === 'closed' || !enableSearch">
60
+ <span
61
+ :class="placeholderStyles"
62
+ :disabled="disabled ? '' : null"
63
+ >
64
+ {{ placeholder }}
65
+ </span>
94
66
  </template>
95
67
  </template>
96
68
 
97
69
  <template v-else>
98
- <template v-if="popoverState === 'open' && enableSearch && isDesktop">
99
- <OrInput
100
- ref="searchControl"
101
- v-model="searchText"
102
- :class="searchControlStyles"
103
- :type="'search'"
104
- :placeholder="placeholder"
105
- :size="size"
106
- :disable-default-styles="true"
107
- @click.stop
108
- />
70
+ <template v-if="!isEmptyModelValue">
71
+ <slot
72
+ name="valueTemplate"
73
+ :model="proxyModelValue"
74
+ >
75
+ <span class="truncate">
76
+ {{ selection && selection.label }}
77
+ </span>
78
+ </slot>
109
79
  </template>
110
80
 
111
- <template v-else>
112
- <template v-if="!isEmptyModelValue">
113
- <slot
114
- name="valueTemplate"
115
- :model="proxyModelValue"
116
- >
117
- <span class="truncate">
118
- {{ selection && selection.label }}
119
- </span>
120
- </slot>
121
- </template>
122
-
123
- <template v-else>
124
- <span
125
- :class="placeholderStyles"
126
- :disabled="disabled ? '' : null"
127
- >
128
- {{ placeholder }}
129
- </span>
130
- </template>
81
+ <template v-else-if="popoverState === 'closed' || !enableSearch">
82
+ <span
83
+ :class="placeholderStyles"
84
+ :disabled="disabled ? '' : null"
85
+ >
86
+ {{ placeholder }}
87
+ </span>
131
88
  </template>
132
89
  </template>
133
90
  </div>
@@ -136,8 +93,25 @@
136
93
  +{{ outerItems.length }}
137
94
  </template>
138
95
 
96
+ <template v-if="popoverState === 'open' && enableSearch && isDesktop">
97
+ <OrInput
98
+ ref="searchControl"
99
+ v-model="searchText"
100
+ :class="[...searchControlStyles, isEmptyModelValue && 'md:!ml-none']"
101
+ :type="'search'"
102
+ :placeholder="placeholder"
103
+ :size="size"
104
+ :disable-default-styles="true"
105
+ @click.stop
106
+ />
107
+ </template>
108
+
109
+ <template v-else>
110
+ <div :class="['grow']" />
111
+ </template>
112
+
139
113
  <div :class="['layout-inline-row', 'gap-sm']">
140
- <template v-if="!isEmptyModelValue && popoverState === 'closed'">
114
+ <template v-if="popoverState === 'closed' && !isEmptyModelValue">
141
115
  <OrIconButton
142
116
  :icon="'close'"
143
117
  :color="'inherit'"
@@ -468,7 +442,6 @@ export default defineComponent({
468
442
 
469
443
  const searchControlStyles = computed(() => [
470
444
  ...SelectSearchControl,
471
- '!visible', // Search control is always visible despite `useOverflow` effects
472
445
  ]);
473
446
 
474
447
  const placeholderStyles = computed(() => [
@@ -8,7 +8,10 @@ export const Select: string[] = [
8
8
 
9
9
  export const SelectControl: string[] = [
10
10
  // Layout
11
- 'layout-row grow',
11
+ 'layout-row',
12
+
13
+ // Layout (empty)
14
+ 'empty:hidden',
12
15
 
13
16
  // Overflow
14
17
  'overflow-hidden',