@onereach/ui-components 8.16.3-beta.3862.0 → 8.16.3

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.
Files changed (44) hide show
  1. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +5 -5
  2. package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +19 -37
  3. package/dist/bundled/v2/components/OrSearchV3/OrSearch.vue.d.ts +4 -6
  4. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +1 -1
  5. package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
  6. package/dist/bundled/v3/components/OrCardCollectionV3/props.js +1 -1
  7. package/dist/bundled/v3/components/OrCardCollectionV3/styles.js +1 -1
  8. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
  9. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
  10. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +1 -1
  11. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +1 -1
  12. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
  13. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
  14. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -1
  15. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +1 -1
  16. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +1 -1
  17. package/dist/bundled/v3/components/{OrRichTextEditorV3-5265594a.js → OrRichTextEditorV3-6d7b206f.js} +5 -5
  18. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +4 -5
  19. package/dist/bundled/v3/components/OrSearchV3/index.js +22 -40
  20. package/dist/bundled/v3/components/index.js +2 -2
  21. package/dist/bundled/v3/index.js +2 -2
  22. package/dist/esm/v2/{OrCardCollection-f2870c25.js → OrCardCollection-e7c0c61d.js} +1 -1
  23. package/dist/esm/v2/{OrRichTextEditor-f05d2e66.js → OrRichTextEditor-7466a45d.js} +5 -5
  24. package/dist/esm/v2/{OrSearch-2910207c.js → OrSearch-de2423bc.js} +21 -39
  25. package/dist/esm/v2/components/index.js +3 -3
  26. package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -3
  27. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
  28. package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +4 -6
  29. package/dist/esm/v2/components/or-search-v3/index.js +3 -3
  30. package/dist/esm/v2/index.js +3 -3
  31. package/dist/esm/v3/{OrCardCollection-fc6fd56c.js → OrCardCollection-ce6c8201.js} +1 -1
  32. package/dist/esm/v3/{OrRichTextEditor-cfa0b54a.js → OrRichTextEditor-d9182fa2.js} +5 -5
  33. package/dist/esm/v3/{OrSearch-fccacdba.js → OrSearch-9c6f1e16.js} +24 -42
  34. package/dist/esm/v3/components/index.js +3 -3
  35. package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
  36. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
  37. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +4 -5
  38. package/dist/esm/v3/components/or-search-v3/index.js +3 -3
  39. package/dist/esm/v3/index.js +3 -3
  40. package/package.json +3 -2
  41. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +5 -5
  42. package/src/components/or-search-v3/OrSearch.vue +19 -46
  43. package/src/hooks/useProxyModelValue.ts +1 -1
  44. /package/dist/bundled/v3/components/{OrCardCollectionV3-dfd98c34.js → OrCardCollectionV3-6b1266a6.js} +0 -0
@@ -1944,7 +1944,7 @@ var __vue_render__ = function () {
1944
1944
  "selected": _vm.isActive[item],
1945
1945
  "disabled": !_vm.isFocused,
1946
1946
  "tooltip": {
1947
- text: item,
1947
+ content: item,
1948
1948
  placement: 'top'
1949
1949
  },
1950
1950
  "icon": {
@@ -1961,7 +1961,7 @@ var __vue_render__ = function () {
1961
1961
  }) : _vm.isVisible(item) ? _c('or-icon-button', {
1962
1962
  attrs: {
1963
1963
  "tooltip": {
1964
- text: _vm.iconTooltipsEnum[item],
1964
+ content: _vm.iconTooltipsEnum[item],
1965
1965
  placement: 'top'
1966
1966
  },
1967
1967
  "selected": _vm.isActive[item],
@@ -2040,7 +2040,7 @@ var __vue_render__ = function () {
2040
2040
  }), _vm._v(" "), _vm._t("files")], 2)]), _vm._v(" "), _vm.moreButtonRef ? _c('or-popover', {
2041
2041
  ref: "moreRef",
2042
2042
  attrs: {
2043
- "trigger": _vm.moreButtonRef.root,
2043
+ "trigger": _vm.moreButtonRef && _vm.moreButtonRef.root,
2044
2044
  "placement": "top-end"
2045
2045
  }
2046
2046
  }, [_c('div', {
@@ -2050,7 +2050,7 @@ var __vue_render__ = function () {
2050
2050
  key: item,
2051
2051
  attrs: {
2052
2052
  "tooltip": {
2053
- text: _vm.iconTooltipsEnum[item],
2053
+ content: _vm.iconTooltipsEnum[item],
2054
2054
  placement: 'top'
2055
2055
  },
2056
2056
  "selected": _vm.isActive[item],
@@ -2070,7 +2070,7 @@ var __vue_render__ = function () {
2070
2070
  ref: "menuRef",
2071
2071
  staticClass: "bg-on-primary",
2072
2072
  attrs: {
2073
- "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
2073
+ "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading] && _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
2074
2074
  "placement": "bottom-start"
2075
2075
  }
2076
2076
  }, [_vm._l(_vm.headingLevels, function (heading) {
@@ -1,11 +1,10 @@
1
- import { defineComponent, ref, computed, reactive, toRef, watch } from 'vue-demi';
1
+ import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
2
2
  import __vue_component__$1 from '../OrInputV3/OrInput.js';
3
- import { b as watchDebounced } from '../../index-1612099e.js';
4
3
  import { InputBoxSize } from '../OrInputBoxV3/props.js';
5
4
  import { useIdAttribute } from '../../hooks/useIdAttribute.js';
6
5
  import { useControlAttributes } from '../../hooks/useControlAttributes.js';
7
6
  import { useValidationAttributes } from '../../hooks/useValidationAttributes.js';
8
- import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
7
+ import { b as watchDebounced } from '../../index-1612099e.js';
9
8
  import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
10
9
 
11
10
  var script = defineComponent({
@@ -13,14 +12,11 @@ var script = defineComponent({
13
12
  components: {
14
13
  OrInput: __vue_component__$1
15
14
  },
16
- model: {
17
- prop: 'modelValue',
18
- event: 'update:modelValue'
19
- },
20
15
  props: {
21
16
  modelValue: {
22
17
  type: String,
23
- default: ''
18
+ default: '',
19
+ required: false
24
20
  },
25
21
  size: {
26
22
  type: String,
@@ -39,35 +35,27 @@ var script = defineComponent({
39
35
  default: false
40
36
  }
41
37
  },
42
- emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'search', 'clear'],
43
- expose: ['root', 'focus', 'blur', 'clear'],
38
+ emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
39
+ expose: ['root', 'focus', 'clear'],
44
40
  setup(props, context) {
41
+ var _a;
45
42
  // Refs
46
43
  const root = ref();
47
44
  // Styles
48
45
  const rootStyles = computed(() => ['or-search-v3']);
49
46
  // State
47
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
50
48
  const controlAttributes = reactive({
51
49
  id: useIdAttribute(),
52
50
  ...useControlAttributes(),
53
51
  ...useValidationAttributes()
54
52
  });
55
- const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
56
- const draftModelValue = ref(props.modelValue);
57
- watch(proxyModelValue, value => {
58
- draftModelValue.value = value;
59
- });
60
- watchDebounced(draftModelValue, value => {
61
- if (value.length > 0) {
62
- proxyModelValue.value = value;
63
- context.emit('search', value);
64
- }
65
- }, {
66
- debounce: toRef(props, 'debounce')
53
+ // Events
54
+ watchDebounced(localModelValue, () => localModelValue.value.length > 0 && context.emit('search', localModelValue.value), {
55
+ debounce: props.debounce
67
56
  });
68
- watch(draftModelValue, (nextValue, prevValue) => {
69
- if (nextValue.length === 0 && prevValue.length > 0) {
70
- proxyModelValue.value = nextValue;
57
+ watch(localModelValue, (val, beforeVal) => {
58
+ if (val.length === 0 && beforeVal.length > 0) {
71
59
  context.emit('search', '');
72
60
  context.emit('clear');
73
61
  }
@@ -78,22 +66,15 @@ var script = defineComponent({
78
66
  (_a = root.value) === null || _a === void 0 ? void 0 : _a.focus(); // fixes error TS2349
79
67
  }
80
68
 
81
- function blur() {
82
- var _a;
83
- (_a = root.value) === null || _a === void 0 ? void 0 : _a.blur(); // fixes error TS2349
84
- }
85
-
86
69
  function clear() {
87
- draftModelValue.value = '';
70
+ localModelValue.value = '';
88
71
  }
89
72
  return {
90
73
  root,
91
74
  rootStyles,
75
+ localModelValue,
92
76
  controlAttributes,
93
- proxyModelValue,
94
- draftModelValue,
95
77
  focus,
96
- blur,
97
78
  clear
98
79
  };
99
80
  }
@@ -114,6 +95,7 @@ var __vue_render__ = function () {
114
95
  "type": 'search',
115
96
  "size": _vm.size,
116
97
  "placeholder": _vm.placeholder,
98
+ "debounce": _vm.debounce,
117
99
  "disable-default-styles": _vm.disableDefaultStyles
118
100
  },
119
101
  on: {
@@ -134,11 +116,11 @@ var __vue_render__ = function () {
134
116
  }
135
117
  },
136
118
  model: {
137
- value: _vm.draftModelValue,
119
+ value: _vm.localModelValue,
138
120
  callback: function ($$v) {
139
- _vm.draftModelValue = typeof $$v === 'string' ? $$v.trim() : $$v;
121
+ _vm.localModelValue = typeof $$v === 'string' ? $$v.trim() : $$v;
140
122
  },
141
- expression: "draftModelValue"
123
+ expression: "localModelValue"
142
124
  }
143
125
  }, 'OrInput', _vm.controlAttributes, false));
144
126
  };
@@ -7,6 +7,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
7
7
  [x: number]: string;
8
8
  } | {}, true> | undefined>;
9
9
  rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
10
+ localModelValue: import("@vue/composition-api").Ref<string>;
10
11
  controlAttributes: {
11
12
  required: boolean | undefined;
12
13
  minlength: number | undefined;
@@ -20,15 +21,13 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
20
21
  'force-state': string | undefined;
21
22
  id: string | undefined;
22
23
  };
23
- proxyModelValue: import("../../hooks").UseProxyModelValueReturn<string>;
24
- draftModelValue: import("@vue/composition-api").Ref<string>;
25
24
  focus: () => void;
26
- blur: () => void;
27
25
  clear: () => void;
28
26
  }> & import("@vue/composition-api").Data, {}, {}, {
29
27
  modelValue: {
30
28
  type: StringConstructor;
31
29
  default: string;
30
+ required: false;
32
31
  };
33
32
  size: {
34
33
  type: PropType<"m" | "s">;
@@ -50,6 +49,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
50
49
  modelValue: {
51
50
  type: StringConstructor;
52
51
  default: string;
52
+ required: false;
53
53
  };
54
54
  size: {
55
55
  type: PropType<"m" | "s">;
@@ -82,6 +82,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
82
82
  [x: number]: string;
83
83
  } | {}, true> | undefined>;
84
84
  rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
85
+ localModelValue: import("@vue/composition-api").Ref<string>;
85
86
  controlAttributes: {
86
87
  required: boolean | undefined;
87
88
  minlength: number | undefined;
@@ -95,10 +96,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
95
96
  'force-state': string | undefined;
96
97
  id: string | undefined;
97
98
  };
98
- proxyModelValue: import("../../hooks").UseProxyModelValueReturn<string>;
99
- draftModelValue: import("@vue/composition-api").Ref<string>;
100
99
  focus: () => void;
101
- blur: () => void;
102
100
  clear: () => void;
103
101
  }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
104
102
  modelValue: string;
@@ -1 +1 @@
1
- export { s as default } from '../OrCardCollectionV3-dfd98c34.js';
1
+ export { s as default } from '../OrCardCollectionV3-6b1266a6.js';
@@ -1 +1 @@
1
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-dfd98c34.js';
1
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-6b1266a6.js';
@@ -1 +1 @@
1
- export { C as CardCollectionView, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-dfd98c34.js';
1
+ export { C as CardCollectionView, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-6b1266a6.js';
@@ -1 +1 @@
1
- export { a as CardCollection, e as CardCollectionContent, f as CardCollectionContentViews, b as CardCollectionToolbar, c as CardCollectionToolbarPanel } from '../OrCardCollectionV3-dfd98c34.js';
1
+ export { a as CardCollection, e as CardCollectionContent, f as CardCollectionContentViews, b as CardCollectionToolbar, c as CardCollectionToolbarPanel } from '../OrCardCollectionV3-6b1266a6.js';
@@ -1 +1 @@
1
- export { s as default } from '../OrRichTextEditorV3-5265594a.js';
1
+ export { s as default } from '../OrRichTextEditorV3-6d7b206f.js';
@@ -1 +1 @@
1
- export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-5265594a.js';
1
+ export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-6d7b206f.js';
@@ -1 +1 @@
1
- export { F as Formats } from '../OrRichTextEditorV3-5265594a.js';
1
+ export { F as Formats } from '../OrRichTextEditorV3-6d7b206f.js';
@@ -1 +1 @@
1
- export { E as EditorContainer, f as EditorInput, b as Toolbar, c as ToolbarButton, e as ToolbarButtonFocused, T as ToolbarContainer } from '../OrRichTextEditorV3-5265594a.js';
1
+ export { E as EditorContainer, f as EditorInput, b as Toolbar, c as ToolbarButton, e as ToolbarButtonFocused, T as ToolbarContainer } from '../OrRichTextEditorV3-6d7b206f.js';
@@ -1,2 +1,2 @@
1
- export { i as default } from '../../../OrRichTextEditorV3-5265594a.js';
1
+ export { i as default } from '../../../OrRichTextEditorV3-6d7b206f.js';
2
2
  import '../../../OrCode-46b1b8aa.js';
@@ -1,2 +1,2 @@
1
- export { C as default } from '../../../OrRichTextEditorV3-5265594a.js';
1
+ export { C as default } from '../../../OrRichTextEditorV3-6d7b206f.js';
2
2
  import '../../../OrCode-46b1b8aa.js';
@@ -1 +1 @@
1
- export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-5265594a.js';
1
+ export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-6d7b206f.js';
@@ -1,3 +1,3 @@
1
1
  import '../../../OrCode-46b1b8aa.js';
2
2
  import '../../../../hooks/useTheme.js';
3
- export { g as color, t as default, h as orCodeHighlightStyle, o as orCodeTheme } from '../../../OrRichTextEditorV3-5265594a.js';
3
+ export { g as color, t as default, h as orCodeHighlightStyle, o as orCodeTheme } from '../../../OrRichTextEditorV3-6d7b206f.js';
@@ -1 +1 @@
1
- export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-5265594a.js';
1
+ export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-6d7b206f.js';
@@ -27523,7 +27523,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27523
27523
  selected: _ctx.isActive[item],
27524
27524
  disabled: !_ctx.isFocused,
27525
27525
  tooltip: {
27526
- text: item,
27526
+ content: item,
27527
27527
  placement: 'top'
27528
27528
  },
27529
27529
  icon: {
@@ -27535,7 +27535,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27535
27535
  }, null, 8 /* PROPS */, ["selected", "disabled", "tooltip", "icon"])) : _ctx.isVisible(item) ? (openBlock(), createBlock(_component_or_icon_button, {
27536
27536
  key: 1,
27537
27537
  tooltip: {
27538
- text: _ctx.iconTooltipsEnum[item],
27538
+ content: _ctx.iconTooltipsEnum[item],
27539
27539
  placement: 'top'
27540
27540
  },
27541
27541
  selected: _ctx.isActive[item],
@@ -27578,14 +27578,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27578
27578
  }, null, 2 /* CLASS */), [[vShow, !_ctx.disableMarkdown]]), renderSlot(_ctx.$slots, "files")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.moreButtonRef ? (openBlock(), createBlock(_component_or_popover, {
27579
27579
  key: 0,
27580
27580
  ref: "moreRef",
27581
- trigger: _ctx.moreButtonRef.root,
27581
+ trigger: _ctx.moreButtonRef && _ctx.moreButtonRef.root,
27582
27582
  placement: "top-end"
27583
27583
  }, {
27584
27584
  default: withCtx(() => [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment$1, null, renderList(_ctx.notVisibleTools, item => {
27585
27585
  return openBlock(), createBlock(_component_or_icon_button, {
27586
27586
  key: item,
27587
27587
  tooltip: {
27588
- text: _ctx.iconTooltipsEnum[item],
27588
+ content: _ctx.iconTooltipsEnum[item],
27589
27589
  placement: 'top'
27590
27590
  },
27591
27591
  selected: _ctx.isActive[item],
@@ -27602,7 +27602,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
27602
27602
  }, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), _ctx.toolbarButtonRef ? (openBlock(), createBlock(_component_or_menu, {
27603
27603
  key: 1,
27604
27604
  ref: "menuRef",
27605
- trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
27605
+ trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading] && _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
27606
27606
  placement: "bottom-start",
27607
27607
  class: "bg-on-primary"
27608
27608
  }, {
@@ -4,6 +4,7 @@ declare const _default: import("vue-demi").DefineComponent<{
4
4
  modelValue: {
5
5
  type: StringConstructor;
6
6
  default: string;
7
+ required: false;
7
8
  };
8
9
  size: {
9
10
  type: PropType<"m" | "s">;
@@ -24,6 +25,7 @@ declare const _default: import("vue-demi").DefineComponent<{
24
25
  }, {
25
26
  root: import("vue-demi").Ref<any>;
26
27
  rootStyles: import("vue-demi").ComputedRef<string[]>;
28
+ localModelValue: import("vue-demi").Ref<string>;
27
29
  controlAttributes: {
28
30
  required: boolean | undefined;
29
31
  minlength: number | undefined;
@@ -37,15 +39,13 @@ declare const _default: import("vue-demi").DefineComponent<{
37
39
  'force-state': string | undefined;
38
40
  id: string | undefined;
39
41
  };
40
- proxyModelValue: import("../../hooks").UseProxyModelValueReturn<string>;
41
- draftModelValue: import("vue-demi").Ref<string>;
42
42
  focus: () => void;
43
- blur: () => void;
44
43
  clear: () => void;
45
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("search" | "update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur" | "clear")[], "search" | "update:modelValue" | "input" | "keydown" | "keyup" | "focus" | "blur" | "clear", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
44
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("search" | "input" | "keydown" | "keyup" | "focus" | "blur" | "clear")[], "search" | "input" | "keydown" | "keyup" | "focus" | "blur" | "clear", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
46
45
  modelValue: {
47
46
  type: StringConstructor;
48
47
  default: string;
48
+ required: false;
49
49
  };
50
50
  size: {
51
51
  type: PropType<"m" | "s">;
@@ -65,7 +65,6 @@ declare const _default: import("vue-demi").DefineComponent<{
65
65
  };
66
66
  }>> & {
67
67
  onSearch?: ((...args: any[]) => any) | undefined;
68
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
69
68
  onInput?: ((...args: any[]) => any) | undefined;
70
69
  onKeydown?: ((...args: any[]) => any) | undefined;
71
70
  onKeyup?: ((...args: any[]) => any) | undefined;
@@ -1,27 +1,23 @@
1
1
  import { I as InputBoxSize } from '../OrInputBoxV3-ddd117f0.js';
2
2
  export { I as SearchSize } from '../OrInputBoxV3-ddd117f0.js';
3
3
  import { resolveComponent, openBlock, createBlock, mergeProps } from 'vue';
4
- import { defineComponent, ref, computed, reactive, toRef, watch } from 'vue-demi';
4
+ import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
5
5
  import { s as script$1 } from '../OrInputV3-5ed9b5fd.js';
6
- import { m as watchDebounced } from '../OrBottomSheetV3-66815f6f.js';
7
6
  import { useIdAttribute } from '../../hooks/useIdAttribute.js';
8
7
  import { useControlAttributes } from '../../hooks/useControlAttributes.js';
9
8
  import { useValidationAttributes } from '../../hooks/useValidationAttributes.js';
10
- import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
9
+ import { m as watchDebounced } from '../OrBottomSheetV3-66815f6f.js';
11
10
 
12
11
  var script = defineComponent({
13
12
  name: 'OrSearch',
14
13
  components: {
15
14
  OrInput: script$1
16
15
  },
17
- model: {
18
- prop: 'modelValue',
19
- event: 'update:modelValue'
20
- },
21
16
  props: {
22
17
  modelValue: {
23
18
  type: String,
24
- default: ''
19
+ default: '',
20
+ required: false
25
21
  },
26
22
  size: {
27
23
  type: String,
@@ -40,35 +36,27 @@ var script = defineComponent({
40
36
  default: false
41
37
  }
42
38
  },
43
- emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'search', 'clear'],
44
- expose: ['root', 'focus', 'blur', 'clear'],
39
+ emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
40
+ expose: ['root', 'focus', 'clear'],
45
41
  setup(props, context) {
42
+ var _a;
46
43
  // Refs
47
44
  const root = ref();
48
45
  // Styles
49
46
  const rootStyles = computed(() => ['or-search-v3']);
50
47
  // State
48
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
51
49
  const controlAttributes = reactive({
52
50
  id: useIdAttribute(),
53
51
  ...useControlAttributes(),
54
52
  ...useValidationAttributes()
55
53
  });
56
- const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
57
- const draftModelValue = ref(props.modelValue);
58
- watch(proxyModelValue, value => {
59
- draftModelValue.value = value;
54
+ // Events
55
+ watchDebounced(localModelValue, () => localModelValue.value.length > 0 && context.emit('search', localModelValue.value), {
56
+ debounce: props.debounce
60
57
  });
61
- watchDebounced(draftModelValue, value => {
62
- if (value.length > 0) {
63
- proxyModelValue.value = value;
64
- context.emit('search', value);
65
- }
66
- }, {
67
- debounce: toRef(props, 'debounce')
68
- });
69
- watch(draftModelValue, (nextValue, prevValue) => {
70
- if (nextValue.length === 0 && prevValue.length > 0) {
71
- proxyModelValue.value = nextValue;
58
+ watch(localModelValue, (val, beforeVal) => {
59
+ if (val.length === 0 && beforeVal.length > 0) {
72
60
  context.emit('search', '');
73
61
  context.emit('clear');
74
62
  }
@@ -79,22 +67,15 @@ var script = defineComponent({
79
67
  (_a = root.value) === null || _a === void 0 ? void 0 : _a.focus(); // fixes error TS2349
80
68
  }
81
69
 
82
- function blur() {
83
- var _a;
84
- (_a = root.value) === null || _a === void 0 ? void 0 : _a.blur(); // fixes error TS2349
85
- }
86
-
87
70
  function clear() {
88
- draftModelValue.value = '';
71
+ localModelValue.value = '';
89
72
  }
90
73
  return {
91
74
  root,
92
75
  rootStyles,
76
+ localModelValue,
93
77
  controlAttributes,
94
- proxyModelValue,
95
- draftModelValue,
96
78
  focus,
97
- blur,
98
79
  clear
99
80
  };
100
81
  }
@@ -104,23 +85,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
104
85
  const _component_OrInput = resolveComponent("OrInput");
105
86
  return openBlock(), createBlock(_component_OrInput, mergeProps({
106
87
  ref: "root",
107
- modelValue: _ctx.draftModelValue,
108
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draftModelValue = $event),
88
+ modelValue: _ctx.localModelValue,
89
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.localModelValue = $event),
109
90
  modelModifiers: {
110
91
  trim: true
111
- }
112
- }, _ctx.controlAttributes, {
92
+ },
113
93
  class: _ctx.rootStyles,
114
94
  type: 'search',
115
95
  size: _ctx.size,
116
96
  placeholder: _ctx.placeholder,
117
- "disable-default-styles": _ctx.disableDefaultStyles,
97
+ debounce: _ctx.debounce,
98
+ "disable-default-styles": _ctx.disableDefaultStyles
99
+ }, _ctx.controlAttributes, {
118
100
  onInput: _cache[1] || (_cache[1] = $event => _ctx.$emit('input', $event)),
119
101
  onKeydown: _cache[2] || (_cache[2] = $event => _ctx.$emit('keydown', $event)),
120
102
  onKeyup: _cache[3] || (_cache[3] = $event => _ctx.$emit('keyup', $event)),
121
103
  onFocus: _cache[4] || (_cache[4] = $event => _ctx.$emit('focus', $event)),
122
104
  onBlur: _cache[5] || (_cache[5] = $event => _ctx.$emit('blur', $event))
123
- }), null, 16 /* FULL_PROPS */, ["modelValue", "class", "size", "placeholder", "disable-default-styles"]);
105
+ }), null, 16 /* FULL_PROPS */, ["modelValue", "class", "size", "placeholder", "debounce", "disable-default-styles"]);
124
106
  }
125
107
 
126
108
  script.render = render;
@@ -8,7 +8,7 @@ export { B as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, a as BUTTON_SIZE, b as BUTT
8
8
  export { default as OrIconButton, default as OrIconButtonV2 } from './OrIconButtonV2/OrIconButton.js';
9
9
  export { default as OrCard } from './OrCard/OrCard.js';
10
10
  export { CARD_COLLECTION_LAYOUT, OrCardCollection } from './OrCardCollection/index.js';
11
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollectionV3-dfd98c34.js';
11
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollectionV3-6b1266a6.js';
12
12
  export { C as CardPadding, s as OrCardV3 } from './OrCardV3-f9908b34.js';
13
13
  export { default as OrCheckbox } from './OrCheckbox/OrCheckbox.js';
14
14
  export { default as OrCheckboxGroupV3 } from './OrCheckboxGroupV3/OrCheckboxGroup.js';
@@ -80,7 +80,7 @@ export { s as OrRangeSliderV3 } from './OrRangeSliderV3-9d36a0c5.js';
80
80
  export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSliderV3-f0ac9b94.js';
81
81
  export { s as OrRatingV3 } from './OrRatingV3-b6b47938.js';
82
82
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanelV3-c24490f4.js';
83
- export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-5265594a.js';
83
+ export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-6d7b206f.js';
84
84
  export { default as OrSearch } from './OrSearch/OrSearch.js';
85
85
  export { OrSearchV3 } from './OrSearchV3/index.js';
86
86
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControlV3-56862f95.js';
@@ -4,7 +4,7 @@ export { a as AvatarColor, A as AvatarSize, s as OrAvatarV3 } from './components
4
4
  export { OrButton, OrButtonColors, OrButtonSizes, OrButtonViews } from './components/OrButton/index.js';
5
5
  export { s as OrButtonGroupV3 } from './components/OrButtonGroupV3-e35a1f1c.js';
6
6
  export { CARD_COLLECTION_LAYOUT, OrCardCollection } from './components/OrCardCollection/index.js';
7
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './components/OrCardCollectionV3-dfd98c34.js';
7
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './components/OrCardCollectionV3-6b1266a6.js';
8
8
  export { C as CardPadding, s as OrCardV3 } from './components/OrCardV3-f9908b34.js';
9
9
  export { default as OrCheckboxGroupV3 } from './components/OrCheckboxGroupV3/OrCheckboxGroup.js';
10
10
  export { s as OrChip, a as OrChips } from './components/OrChips-ba5bb85b.js';
@@ -42,7 +42,7 @@ export { default as OrRadioGroup } from './components/OrRadioGroup/OrRadioGroup.
42
42
  export { default as OrRadioGroupV3 } from './components/OrRadioGroupV3/OrRadioGroup.js';
43
43
  export { s as OrRangeSliderV3 } from './components/OrRangeSliderV3-9d36a0c5.js';
44
44
  export { s as OrRatingV3 } from './components/OrRatingV3-b6b47938.js';
45
- export { F as Formats, s as OrRichTextEditorV3 } from './components/OrRichTextEditorV3-5265594a.js';
45
+ export { F as Formats, s as OrRichTextEditorV3 } from './components/OrRichTextEditorV3-6d7b206f.js';
46
46
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './components/OrSegmentedControlV3-56862f95.js';
47
47
  export { s as OrSelect } from './components/OrSelect-ab9e3084.js';
48
48
  export { s as OrSelectV3 } from './components/OrSelectV3-f212f5c6.js';
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, ref, watch } from 'vue-demi';
2
2
  import { _ as __vue_component__$2 } from './OrIconButton-edff56d4.js';
3
- import { _ as __vue_component__$4 } from './OrSearch-2910207c.js';
3
+ import { _ as __vue_component__$4 } from './OrSearch-de2423bc.js';
4
4
  import './OrInputBox.vue_rollup-plugin-vue_script-65ebcf4d.js';
5
5
  import { _ as __vue_component__$5 } from './OrLoader-784e2060.js';
6
6
  import { _ as __vue_component__$3 } from './OrSorting-65c84965.js';
@@ -755,7 +755,7 @@ var __vue_render__ = function () {
755
755
  "selected": _vm.isActive[item],
756
756
  "disabled": !_vm.isFocused,
757
757
  "tooltip": {
758
- text: item,
758
+ content: item,
759
759
  placement: 'top'
760
760
  },
761
761
  "icon": {
@@ -772,7 +772,7 @@ var __vue_render__ = function () {
772
772
  }) : _vm.isVisible(item) ? _c('or-icon-button', {
773
773
  attrs: {
774
774
  "tooltip": {
775
- text: _vm.iconTooltipsEnum[item],
775
+ content: _vm.iconTooltipsEnum[item],
776
776
  placement: 'top'
777
777
  },
778
778
  "selected": _vm.isActive[item],
@@ -851,7 +851,7 @@ var __vue_render__ = function () {
851
851
  }), _vm._v(" "), _vm._t("files")], 2)]), _vm._v(" "), _vm.moreButtonRef ? _c('or-popover', {
852
852
  ref: "moreRef",
853
853
  attrs: {
854
- "trigger": _vm.moreButtonRef.root,
854
+ "trigger": _vm.moreButtonRef && _vm.moreButtonRef.root,
855
855
  "placement": "top-end"
856
856
  }
857
857
  }, [_c('div', {
@@ -861,7 +861,7 @@ var __vue_render__ = function () {
861
861
  key: item,
862
862
  attrs: {
863
863
  "tooltip": {
864
- text: _vm.iconTooltipsEnum[item],
864
+ content: _vm.iconTooltipsEnum[item],
865
865
  placement: 'top'
866
866
  },
867
867
  "selected": _vm.isActive[item],
@@ -881,7 +881,7 @@ var __vue_render__ = function () {
881
881
  ref: "menuRef",
882
882
  staticClass: "bg-on-primary",
883
883
  attrs: {
884
- "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
884
+ "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading] && _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
885
885
  "placement": "bottom-start"
886
886
  }
887
887
  }, [_vm._l(_vm.headingLevels, function (heading) {