@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
@@ -1,13 +1,12 @@
1
- import { watchDebounced } from '@vueuse/core';
2
- import { defineComponent, ref, computed, reactive, toRef, watch } from 'vue-demi';
1
+ import { debouncedWatch } from '@vueuse/core';
2
+ import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
3
+ import { _ as __vue_component__$1 } from './OrInput-ac6484dd.js';
4
+ import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-65ebcf4d.js';
3
5
  import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
4
6
  import './dom-aecadd9a.js';
5
- import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
6
7
  import '@onereach/styles/tailwind/plugins/core';
7
8
  import '@onereach/styles/tailwind.config.json';
8
9
  import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
9
- import { _ as __vue_component__$1 } from './OrInput-ac6484dd.js';
10
- import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-65ebcf4d.js';
11
10
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
12
11
 
13
12
  var script = defineComponent({
@@ -15,14 +14,11 @@ var script = defineComponent({
15
14
  components: {
16
15
  OrInput: __vue_component__$1
17
16
  },
18
- model: {
19
- prop: 'modelValue',
20
- event: 'update:modelValue'
21
- },
22
17
  props: {
23
18
  modelValue: {
24
19
  type: String,
25
- default: ''
20
+ default: '',
21
+ required: false
26
22
  },
27
23
  size: {
28
24
  type: String,
@@ -41,35 +37,27 @@ var script = defineComponent({
41
37
  default: false
42
38
  }
43
39
  },
44
- emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'search', 'clear'],
45
- expose: ['root', 'focus', 'blur', 'clear'],
40
+ emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
41
+ expose: ['root', 'focus', 'clear'],
46
42
  setup(props, context) {
43
+ var _a;
47
44
  // Refs
48
45
  const root = ref();
49
46
  // Styles
50
47
  const rootStyles = computed(() => ['or-search-v3']);
51
48
  // State
49
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
52
50
  const controlAttributes = reactive({
53
51
  id: useIdAttribute(),
54
52
  ...useControlAttributes(),
55
53
  ...useValidationAttributes()
56
54
  });
57
- const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
58
- const draftModelValue = ref(props.modelValue);
59
- watch(proxyModelValue, value => {
60
- draftModelValue.value = value;
55
+ // Events
56
+ debouncedWatch(localModelValue, () => localModelValue.value.length > 0 && context.emit('search', localModelValue.value), {
57
+ debounce: props.debounce
61
58
  });
62
- watchDebounced(draftModelValue, value => {
63
- if (value.length > 0) {
64
- proxyModelValue.value = value;
65
- context.emit('search', value);
66
- }
67
- }, {
68
- debounce: toRef(props, 'debounce')
69
- });
70
- watch(draftModelValue, (nextValue, prevValue) => {
71
- if (nextValue.length === 0 && prevValue.length > 0) {
72
- proxyModelValue.value = nextValue;
59
+ watch(localModelValue, (val, beforeVal) => {
60
+ if (val.length === 0 && beforeVal.length > 0) {
73
61
  context.emit('search', '');
74
62
  context.emit('clear');
75
63
  }
@@ -80,22 +68,15 @@ var script = defineComponent({
80
68
  (_a = root.value) === null || _a === void 0 ? void 0 : _a.focus(); // fixes error TS2349
81
69
  }
82
70
 
83
- function blur() {
84
- var _a;
85
- (_a = root.value) === null || _a === void 0 ? void 0 : _a.blur(); // fixes error TS2349
86
- }
87
-
88
71
  function clear() {
89
- draftModelValue.value = '';
72
+ localModelValue.value = '';
90
73
  }
91
74
  return {
92
75
  root,
93
76
  rootStyles,
77
+ localModelValue,
94
78
  controlAttributes,
95
- proxyModelValue,
96
- draftModelValue,
97
79
  focus,
98
- blur,
99
80
  clear
100
81
  };
101
82
  }
@@ -116,6 +97,7 @@ var __vue_render__ = function () {
116
97
  "type": 'search',
117
98
  "size": _vm.size,
118
99
  "placeholder": _vm.placeholder,
100
+ "debounce": _vm.debounce,
119
101
  "disable-default-styles": _vm.disableDefaultStyles
120
102
  },
121
103
  on: {
@@ -136,11 +118,11 @@ var __vue_render__ = function () {
136
118
  }
137
119
  },
138
120
  model: {
139
- value: _vm.draftModelValue,
121
+ value: _vm.localModelValue,
140
122
  callback: function ($$v) {
141
- _vm.draftModelValue = typeof $$v === 'string' ? $$v.trim() : $$v;
123
+ _vm.localModelValue = typeof $$v === 'string' ? $$v.trim() : $$v;
142
124
  },
143
- expression: "draftModelValue"
125
+ expression: "localModelValue"
144
126
  }
145
127
  }, 'OrInput', _vm.controlAttributes, false));
146
128
  };
@@ -10,7 +10,7 @@ export { _ as OrIconButton, _ as OrIconButtonV2 } from '../OrIconButton-f6370222
10
10
  export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE } from '../OrIconButton.vue_rollup-plugin-vue_styles.0-02ba7b68.js';
11
11
  export { _ as OrCard } from '../OrCard-c44d9783.js';
12
12
  export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-d7e546a0.js';
13
- export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-f2870c25.js';
13
+ export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-e7c0c61d.js';
14
14
  export { C as CardPadding, _ as OrCardV3 } from '../OrCard-54dce216.js';
15
15
  export { _ as OrCheckbox } from '../OrCheckbox-3337d903.js';
16
16
  export { _ as OrCheckboxGroupV3 } from '../OrCheckboxGroup-f8781127.js';
@@ -97,9 +97,9 @@ export { _ as OrSliderV3 } from '../OrSlider-a474445c.js';
97
97
  export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider.vue_rollup-plugin-vue_script-09b4700b.js';
98
98
  export { _ as OrRatingV3 } from '../OrRating-abf1b609.js';
99
99
  export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from '../OrResizeablePanel-757f7dc1.js';
100
- export { F as Formats, _ as OrRichTextEditorV3 } from '../OrRichTextEditor-f05d2e66.js';
100
+ export { F as Formats, _ as OrRichTextEditorV3 } from '../OrRichTextEditor-7466a45d.js';
101
101
  export { _ as OrSearch } from '../OrSearch-ddf244e6.js';
102
- export { _ as OrSearchV3 } from '../OrSearch-2910207c.js';
102
+ export { _ as OrSearchV3 } from '../OrSearch-de2423bc.js';
103
103
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-00583234.js';
104
104
  export { _ as OrSelect } from '../OrSelect-d271f7a3.js';
105
105
  export { _ as OrSelectV3 } from '../OrSelect-30f5ce68.js';
@@ -1,4 +1,4 @@
1
- export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-f2870c25.js';
1
+ export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-e7c0c61d.js';
2
2
  import 'vue-demi';
3
3
  import '../../OrIconButton-edff56d4.js';
4
4
  import '../../OrIcon-3f99ef27.js';
@@ -20,11 +20,11 @@ import '../../OrOverlay-9aa5020f.js';
20
20
  import '../../OrTeleport.vue2-9eb0eaee.js';
21
21
  import 'portal-vue';
22
22
  import '../../useTheme-0ef25778.js';
23
- import '../../OrSearch-2910207c.js';
23
+ import '../../OrSearch-de2423bc.js';
24
+ import '../../OrInput-ac6484dd.js';
24
25
  import '../../useIdAttribute-859439f0.js';
25
26
  import '../../useProxyModelValue-940010d2.js';
26
27
  import '../../useValidationAttributes-d1abbe34.js';
27
- import '../../OrInput-ac6484dd.js';
28
28
  import '../../OrError-916e928e.js';
29
29
  import '../../OrHint-1220face.js';
30
30
  import '../../OrInputBox-140c344d.js';
@@ -1,4 +1,4 @@
1
- export { F as Formats, _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-f05d2e66.js';
1
+ export { F as Formats, _ as OrRichTextEditorV3 } from '../../OrRichTextEditor-7466a45d.js';
2
2
  import 'vue-demi';
3
3
  import '@vueuse/integrations/useFocusTrap';
4
4
  import '@vueuse/core';
@@ -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,17 +1,17 @@
1
- export { _ as OrSearchV3 } from '../../OrSearch-2910207c.js';
1
+ export { _ as OrSearchV3 } from '../../OrSearch-de2423bc.js';
2
2
  export { I as SearchSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-65ebcf4d.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
5
+ import '../../OrInput-ac6484dd.js';
5
6
  import '../../useIdAttribute-859439f0.js';
6
7
  import '../../dom-aecadd9a.js';
7
8
  import 'lodash/isElement';
8
9
  import 'lodash/get';
9
10
  import '../../useProxyModelValue-940010d2.js';
11
+ import '../../useResponsive-1baf3485.js';
10
12
  import '@onereach/styles/tailwind/plugins/core';
11
13
  import '@onereach/styles/tailwind.config.json';
12
14
  import '../../useValidationAttributes-d1abbe34.js';
13
- import '../../OrInput-ac6484dd.js';
14
- import '../../useResponsive-1baf3485.js';
15
15
  import '../../OrError-916e928e.js';
16
16
  import '../../normalize-component-6e8e3d80.js';
17
17
  import '../../OrHint-1220face.js';
@@ -10,7 +10,7 @@ export { _ as OrIconButton, _ as OrIconButtonV2 } from './OrIconButton-f6370222.
10
10
  export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE } from './OrIconButton.vue_rollup-plugin-vue_styles.0-02ba7b68.js';
11
11
  export { _ as OrCard } from './OrCard-c44d9783.js';
12
12
  export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from './OrCardCollection-d7e546a0.js';
13
- export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-f2870c25.js';
13
+ export { C as CardCollectionView, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-e7c0c61d.js';
14
14
  export { C as CardPadding, _ as OrCardV3 } from './OrCard-54dce216.js';
15
15
  export { _ as OrCheckbox } from './OrCheckbox-3337d903.js';
16
16
  export { _ as OrCheckboxGroupV3 } from './OrCheckboxGroup-f8781127.js';
@@ -97,9 +97,9 @@ export { _ as OrSliderV3 } from './OrSlider-a474445c.js';
97
97
  export { S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider.vue_rollup-plugin-vue_script-09b4700b.js';
98
98
  export { _ as OrRatingV3 } from './OrRating-abf1b609.js';
99
99
  export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanel-757f7dc1.js';
100
- export { F as Formats, _ as OrRichTextEditorV3 } from './OrRichTextEditor-f05d2e66.js';
100
+ export { F as Formats, _ as OrRichTextEditorV3 } from './OrRichTextEditor-7466a45d.js';
101
101
  export { _ as OrSearch } from './OrSearch-ddf244e6.js';
102
- export { _ as OrSearchV3 } from './OrSearch-2910207c.js';
102
+ export { _ as OrSearchV3 } from './OrSearch-de2423bc.js';
103
103
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-00583234.js';
104
104
  export { _ as OrSelect } from './OrSelect-d271f7a3.js';
105
105
  export { _ as OrSelectV3 } from './OrSelect-30f5ce68.js';
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, ref, watch } from 'vue-demi';
2
2
  import { s as script$2 } from './OrIconButton-13fd3f96.js';
3
- import { s as script$4 } from './OrSearch-fccacdba.js';
3
+ import { s as script$4 } from './OrSearch-9c6f1e16.js';
4
4
  import './OrInputBox-8c1a29dd.js';
5
5
  import { s as script$5 } from './OrLoader-b7d415dd.js';
6
6
  import { s as script$3 } from './OrSorting-15a719a1.js';
@@ -766,7 +766,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
766
766
  selected: _ctx.isActive[item],
767
767
  disabled: !_ctx.isFocused,
768
768
  tooltip: {
769
- text: item,
769
+ content: item,
770
770
  placement: 'top'
771
771
  },
772
772
  icon: {
@@ -778,7 +778,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
778
778
  }, null, 8 /* PROPS */, ["selected", "disabled", "tooltip", "icon"])) : _ctx.isVisible(item) ? (openBlock(), createBlock(_component_or_icon_button, {
779
779
  key: 1,
780
780
  tooltip: {
781
- text: _ctx.iconTooltipsEnum[item],
781
+ content: _ctx.iconTooltipsEnum[item],
782
782
  placement: 'top'
783
783
  },
784
784
  selected: _ctx.isActive[item],
@@ -821,14 +821,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
821
821
  }, null, 2 /* CLASS */), [[vShow, !_ctx.disableMarkdown]]), renderSlot(_ctx.$slots, "files")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.moreButtonRef ? (openBlock(), createBlock(_component_or_popover, {
822
822
  key: 0,
823
823
  ref: "moreRef",
824
- trigger: _ctx.moreButtonRef.root,
824
+ trigger: _ctx.moreButtonRef && _ctx.moreButtonRef.root,
825
825
  placement: "top-end"
826
826
  }, {
827
827
  default: withCtx(() => [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.notVisibleTools, item => {
828
828
  return openBlock(), createBlock(_component_or_icon_button, {
829
829
  key: item,
830
830
  tooltip: {
831
- text: _ctx.iconTooltipsEnum[item],
831
+ content: _ctx.iconTooltipsEnum[item],
832
832
  placement: 'top'
833
833
  },
834
834
  selected: _ctx.isActive[item],
@@ -845,7 +845,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
845
845
  }, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), _ctx.toolbarButtonRef ? (openBlock(), createBlock(_component_or_menu, {
846
846
  key: 1,
847
847
  ref: "menuRef",
848
- trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
848
+ trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading] && _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
849
849
  placement: "bottom-start",
850
850
  class: "bg-on-primary"
851
851
  }, {
@@ -1,13 +1,12 @@
1
- import { watchDebounced } from '@vueuse/core';
2
- import { defineComponent, ref, computed, reactive, toRef, watch } from 'vue-demi';
1
+ import { debouncedWatch } from '@vueuse/core';
2
+ import { defineComponent, ref, computed, reactive, watch } from 'vue-demi';
3
+ import { s as script$1 } from './OrInput-2810a760.js';
4
+ import { I as InputBoxSize } from './OrInputBox-8c1a29dd.js';
3
5
  import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
4
6
  import './dom-aecadd9a.js';
5
- import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
6
7
  import '@onereach/styles/tailwind/plugins/core';
7
8
  import '@onereach/styles/tailwind.config.json';
8
9
  import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
9
- import { s as script$1 } from './OrInput-2810a760.js';
10
- import { I as InputBoxSize } from './OrInputBox-8c1a29dd.js';
11
10
  import { resolveComponent, openBlock, createBlock, mergeProps } from 'vue';
12
11
 
13
12
  var script = defineComponent({
@@ -15,14 +14,11 @@ var script = defineComponent({
15
14
  components: {
16
15
  OrInput: script$1
17
16
  },
18
- model: {
19
- prop: 'modelValue',
20
- event: 'update:modelValue'
21
- },
22
17
  props: {
23
18
  modelValue: {
24
19
  type: String,
25
- default: ''
20
+ default: '',
21
+ required: false
26
22
  },
27
23
  size: {
28
24
  type: String,
@@ -41,35 +37,27 @@ var script = defineComponent({
41
37
  default: false
42
38
  }
43
39
  },
44
- emits: ['update:modelValue', 'input', 'keydown', 'keyup', 'focus', 'blur', 'search', 'clear'],
45
- expose: ['root', 'focus', 'blur', 'clear'],
40
+ emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
41
+ expose: ['root', 'focus', 'clear'],
46
42
  setup(props, context) {
43
+ var _a;
47
44
  // Refs
48
45
  const root = ref();
49
46
  // Styles
50
47
  const rootStyles = computed(() => ['or-search-v3']);
51
48
  // State
49
+ const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
52
50
  const controlAttributes = reactive({
53
51
  id: useIdAttribute(),
54
52
  ...useControlAttributes(),
55
53
  ...useValidationAttributes()
56
54
  });
57
- const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
58
- const draftModelValue = ref(props.modelValue);
59
- watch(proxyModelValue, value => {
60
- draftModelValue.value = value;
61
- });
62
- watchDebounced(draftModelValue, value => {
63
- if (value.length > 0) {
64
- proxyModelValue.value = value;
65
- context.emit('search', value);
66
- }
67
- }, {
68
- debounce: toRef(props, 'debounce')
55
+ // Events
56
+ debouncedWatch(localModelValue, () => localModelValue.value.length > 0 && context.emit('search', localModelValue.value), {
57
+ debounce: props.debounce
69
58
  });
70
- watch(draftModelValue, (nextValue, prevValue) => {
71
- if (nextValue.length === 0 && prevValue.length > 0) {
72
- proxyModelValue.value = nextValue;
59
+ watch(localModelValue, (val, beforeVal) => {
60
+ if (val.length === 0 && beforeVal.length > 0) {
73
61
  context.emit('search', '');
74
62
  context.emit('clear');
75
63
  }
@@ -80,22 +68,15 @@ var script = defineComponent({
80
68
  (_a = root.value) === null || _a === void 0 ? void 0 : _a.focus(); // fixes error TS2349
81
69
  }
82
70
 
83
- function blur() {
84
- var _a;
85
- (_a = root.value) === null || _a === void 0 ? void 0 : _a.blur(); // fixes error TS2349
86
- }
87
-
88
71
  function clear() {
89
- draftModelValue.value = '';
72
+ localModelValue.value = '';
90
73
  }
91
74
  return {
92
75
  root,
93
76
  rootStyles,
77
+ localModelValue,
94
78
  controlAttributes,
95
- proxyModelValue,
96
- draftModelValue,
97
79
  focus,
98
- blur,
99
80
  clear
100
81
  };
101
82
  }
@@ -105,23 +86,24 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
105
86
  const _component_OrInput = resolveComponent("OrInput");
106
87
  return openBlock(), createBlock(_component_OrInput, mergeProps({
107
88
  ref: "root",
108
- modelValue: _ctx.draftModelValue,
109
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.draftModelValue = $event),
89
+ modelValue: _ctx.localModelValue,
90
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => _ctx.localModelValue = $event),
110
91
  modelModifiers: {
111
92
  trim: true
112
- }
113
- }, _ctx.controlAttributes, {
93
+ },
114
94
  class: _ctx.rootStyles,
115
95
  type: 'search',
116
96
  size: _ctx.size,
117
97
  placeholder: _ctx.placeholder,
118
- "disable-default-styles": _ctx.disableDefaultStyles,
98
+ debounce: _ctx.debounce,
99
+ "disable-default-styles": _ctx.disableDefaultStyles
100
+ }, _ctx.controlAttributes, {
119
101
  onInput: _cache[1] || (_cache[1] = $event => _ctx.$emit('input', $event)),
120
102
  onKeydown: _cache[2] || (_cache[2] = $event => _ctx.$emit('keydown', $event)),
121
103
  onKeyup: _cache[3] || (_cache[3] = $event => _ctx.$emit('keyup', $event)),
122
104
  onFocus: _cache[4] || (_cache[4] = $event => _ctx.$emit('focus', $event)),
123
105
  onBlur: _cache[5] || (_cache[5] = $event => _ctx.$emit('blur', $event))
124
- }), null, 16 /* FULL_PROPS */, ["modelValue", "class", "size", "placeholder", "disable-default-styles"]);
106
+ }), null, 16 /* FULL_PROPS */, ["modelValue", "class", "size", "placeholder", "debounce", "disable-default-styles"]);
125
107
  }
126
108
 
127
109
  script.render = render;
@@ -8,7 +8,7 @@ export { s as OrButtonV2 } from '../OrButton-f4098587.js';
8
8
  export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE, s as OrIconButton, s as OrIconButtonV2 } from '../OrIconButton-4424a0dc.js';
9
9
  export { s as OrCard } from '../OrCard-e3a5aea4.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from '../OrCardCollection-7fd78cc8.js';
11
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-fc6fd56c.js';
11
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-ce6c8201.js';
12
12
  export { C as CardPadding, s as OrCardV3 } from '../OrCard-d3320b27.js';
13
13
  export { s as OrCheckbox } from '../OrCheckbox-42ed332c.js';
14
14
  export { s as OrCheckboxGroupV3 } from '../OrCheckboxGroup-e12e94c8.js';
@@ -93,9 +93,9 @@ export { s as OrRangeSliderV3 } from '../OrRangeSlider-758f8cc7.js';
93
93
  export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from '../OrSlider-1437f51e.js';
94
94
  export { s as OrRatingV3 } from '../OrRating-ec9462c5.js';
95
95
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from '../OrResizeablePanel-525d396f.js';
96
- export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditor-cfa0b54a.js';
96
+ export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditor-d9182fa2.js';
97
97
  export { s as OrSearch } from '../OrSearch-aa57d4e8.js';
98
- export { s as OrSearchV3 } from '../OrSearch-fccacdba.js';
98
+ export { s as OrSearchV3 } from '../OrSearch-9c6f1e16.js';
99
99
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-adbf7f4e.js';
100
100
  export { s as OrSelect } from '../OrSelect-a366e668.js';
101
101
  export { s as OrSelectV3 } from '../OrSelect-a65c0b08.js';
@@ -1,4 +1,4 @@
1
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-fc6fd56c.js';
1
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../../OrCardCollection-ce6c8201.js';
2
2
  import 'vue-demi';
3
3
  import '../../OrIconButton-13fd3f96.js';
4
4
  import '../../OrIcon-b2e2d0aa.js';
@@ -19,11 +19,11 @@ import '../../OrBottomSheet-e33d1de9.js';
19
19
  import '../../OrOverlay-d00d79f1.js';
20
20
  import '../../OrTeleport.vue3-bf77eed4.js';
21
21
  import '../../useTheme-0ef25778.js';
22
- import '../../OrSearch-fccacdba.js';
22
+ import '../../OrSearch-9c6f1e16.js';
23
+ import '../../OrInput-2810a760.js';
23
24
  import '../../useIdAttribute-859439f0.js';
24
25
  import '../../useProxyModelValue-940010d2.js';
25
26
  import '../../useValidationAttributes-d1abbe34.js';
26
- import '../../OrInput-2810a760.js';
27
27
  import '../../OrError-69bd7f6a.js';
28
28
  import '../../OrHint-55d3de35.js';
29
29
  import '../../OrInputBox-8c1a29dd.js';
@@ -1,4 +1,4 @@
1
- export { F as Formats, s as OrRichTextEditorV3 } from '../../OrRichTextEditor-cfa0b54a.js';
1
+ export { F as Formats, s as OrRichTextEditorV3 } from '../../OrRichTextEditor-d9182fa2.js';
2
2
  import 'vue-demi';
3
3
  import '@vueuse/integrations/useFocusTrap';
4
4
  import '@vueuse/core';
@@ -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,17 +1,17 @@
1
- export { s as OrSearchV3 } from '../../OrSearch-fccacdba.js';
1
+ export { s as OrSearchV3 } from '../../OrSearch-9c6f1e16.js';
2
2
  export { I as SearchSize } from '../../OrInputBox-8c1a29dd.js';
3
3
  import '@vueuse/core';
4
4
  import 'vue-demi';
5
+ import '../../OrInput-2810a760.js';
5
6
  import '../../useIdAttribute-859439f0.js';
6
7
  import '../../dom-aecadd9a.js';
7
8
  import 'lodash/isElement';
8
9
  import 'lodash/get';
9
10
  import '../../useProxyModelValue-940010d2.js';
11
+ import '../../useResponsive-1baf3485.js';
10
12
  import '@onereach/styles/tailwind/plugins/core';
11
13
  import '@onereach/styles/tailwind.config.json';
12
14
  import '../../useValidationAttributes-d1abbe34.js';
13
- import '../../OrInput-2810a760.js';
14
- import '../../useResponsive-1baf3485.js';
15
15
  import '../../OrError-69bd7f6a.js';
16
16
  import 'vue';
17
17
  import '../../OrHint-55d3de35.js';
@@ -8,7 +8,7 @@ export { s as OrButtonV2 } from './OrButton-f4098587.js';
8
8
  export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE, s as OrIconButton, s as OrIconButtonV2 } from './OrIconButton-4424a0dc.js';
9
9
  export { s as OrCard } from './OrCard-e3a5aea4.js';
10
10
  export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-7fd78cc8.js';
11
- export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-fc6fd56c.js';
11
+ export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-ce6c8201.js';
12
12
  export { C as CardPadding, s as OrCardV3 } from './OrCard-d3320b27.js';
13
13
  export { s as OrCheckbox } from './OrCheckbox-42ed332c.js';
14
14
  export { s as OrCheckboxGroupV3 } from './OrCheckboxGroup-e12e94c8.js';
@@ -93,9 +93,9 @@ export { s as OrRangeSliderV3 } from './OrRangeSlider-758f8cc7.js';
93
93
  export { s as OrSliderV3, S as RangeSliderColor, a as RangeSliderOrientation, S as SliderColor, a as SliderOrientation } from './OrSlider-1437f51e.js';
94
94
  export { s as OrRatingV3 } from './OrRating-ec9462c5.js';
95
95
  export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement, R as SidebarPadding } from './OrResizeablePanel-525d396f.js';
96
- export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditor-cfa0b54a.js';
96
+ export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditor-d9182fa2.js';
97
97
  export { s as OrSearch } from './OrSearch-aa57d4e8.js';
98
- export { s as OrSearchV3 } from './OrSearch-fccacdba.js';
98
+ export { s as OrSearchV3 } from './OrSearch-9c6f1e16.js';
99
99
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-adbf7f4e.js';
100
100
  export { s as OrSelect } from './OrSelect-a366e668.js';
101
101
  export { s as OrSelectV3 } from './OrSelect-a65c0b08.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "8.16.3-beta.3862.0",
3
+ "version": "8.16.3",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -176,5 +176,6 @@
176
176
  "default": "./dist/bundled/v3/components/*/index.js"
177
177
  },
178
178
  "./package.json": "./package.json"
179
- }
179
+ },
180
+ "gitHead": "33df1b7f5022fb9b193ed8523f7a5c076492909a"
180
181
  }