@onereach/ui-components 2.62.3-beta.1901.0 → 2.62.3-beta.1903.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.
Files changed (39) hide show
  1. package/dist/v2/{OrConfirm-deb66787.js → OrConfirm-d561bf82.js} +1 -1
  2. package/dist/v2/{OrInput-9b87535a.js → OrInput-0dcfba2a.js} +4 -6
  3. package/dist/v2/{OrSearch-8d97eb16.js → OrSearch-45ea8c33.js} +1 -1
  4. package/dist/v2/{OrSelect-2d038a44.js → OrSelect-b44cac14.js} +12 -32
  5. package/dist/v2/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  6. package/dist/v2/directives/index.d.ts +2 -0
  7. package/dist/v2/dropdown-open-0d314aa4.js +28 -0
  8. package/dist/v2/index.d.ts +1 -0
  9. package/dist/v2/index.js +5 -4
  10. package/dist/v2/index2.js +5 -4
  11. package/dist/v2/index20.js +2 -2
  12. package/dist/v2/index38.js +1 -1
  13. package/dist/v2/index62.js +2 -2
  14. package/dist/v2/index64.js +3 -2
  15. package/dist/v2/index91.js +1 -6
  16. package/dist/v2/index92.js +5 -1
  17. package/dist/v2/index93.js +3 -0
  18. package/dist/v3/{OrConfirm-118e052c.js → OrConfirm-a9d3f157.js} +1 -1
  19. package/dist/v3/{OrInput-0a21591a.js → OrInput-f51916d4.js} +2 -5
  20. package/dist/v3/{OrSearch-8af88170.js → OrSearch-e27cadbf.js} +1 -1
  21. package/dist/v3/{OrSelect-32207997.js → OrSelect-9d821ef2.js} +11 -31
  22. package/dist/v3/components/or-select-v3/OrSelect.vue.d.ts +2 -2
  23. package/dist/v3/directives/index.d.ts +2 -0
  24. package/dist/v3/dropdown-open-0d314aa4.js +28 -0
  25. package/dist/v3/index.d.ts +1 -0
  26. package/dist/v3/index.js +5 -4
  27. package/dist/v3/index2.js +5 -4
  28. package/dist/v3/index20.js +2 -2
  29. package/dist/v3/index38.js +1 -1
  30. package/dist/v3/index62.js +2 -2
  31. package/dist/v3/index64.js +3 -2
  32. package/dist/v3/index91.js +1 -6
  33. package/dist/v3/index92.js +5 -1
  34. package/dist/v3/index93.js +3 -0
  35. package/package.json +1 -1
  36. package/src/components/or-input-v3/OrInput.vue +19 -21
  37. package/src/components/or-select-v3/OrSelect.vue +9 -6
  38. package/src/directives/index.ts +2 -0
  39. package/src/index.ts +1 -0
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, watch } from 'vue-demi';
2
2
  import { _ as __vue_component__$2, a as ButtonColor } from './OrButton-eb895669.js';
3
3
  import { _ as __vue_component__$1 } from './OrOverlay-4838a9b0.js';
4
- import { _ as __vue_component__$3 } from './OrInput-9b87535a.js';
4
+ import { _ as __vue_component__$3 } from './OrInput-0dcfba2a.js';
5
5
  import { useMagicKeys, whenever } from '@vueuse/core';
6
6
  import { logicAnd } from '@vueuse/math';
7
7
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
@@ -143,7 +143,7 @@ var script = defineComponent({
143
143
  }
144
144
  });
145
145
 
146
- var css_248z = "input[data-v-61c8b450]{min-width:0;background:0 0;outline:0}input[type=number][data-v-61c8b450]::-webkit-inner-spin-button{display:none}input[type=search][data-v-61c8b450]::-webkit-search-cancel-button{display:none}";
146
+ var css_248z = "input[data-v-8536ff50]{min-width:0;background:0 0;outline:0}input[type=number][data-v-8536ff50]::-webkit-inner-spin-button{display:none}input[type=search][data-v-8536ff50]::-webkit-search-cancel-button{display:none}";
147
147
  styleInject(css_248z);
148
148
 
149
149
  /* script */
@@ -302,9 +302,7 @@ var __vue_render__ = function () {
302
302
  _vm.proxyModelValue = $event.target.value;
303
303
  }
304
304
  }
305
- }, 'input', _vm.$attrs, false)), _vm._v(" "), _c('div', {
306
- class: ['-m-xs', 'ml-none']
307
- }, [_vm.type === 'password' ? [_c('OrIconButton', {
305
+ }, 'input', _vm.$attrs, false)), _vm._v(" "), _vm.type === 'password' ? [_c('OrIconButton', {
308
306
  attrs: {
309
307
  "icon": {
310
308
  icon: _vm.disclosed ? 'visibility_off' : 'visibility',
@@ -336,7 +334,7 @@ var __vue_render__ = function () {
336
334
  "icon": 'search',
337
335
  "variant": 'outlined'
338
336
  }
339
- })]] : _vm._e()], 2)]), _vm._v(" "), !_vm.invalid ? [_c('OrHint', {
337
+ })]] : _vm._e()], 2), _vm._v(" "), !_vm.invalid ? [_c('OrHint', {
340
338
  attrs: {
341
339
  "disabled": _vm.disabled
342
340
  },
@@ -365,7 +363,7 @@ var __vue_staticRenderFns__ = [];
365
363
  /* style */
366
364
  const __vue_inject_styles__ = undefined;
367
365
  /* scoped */
368
- const __vue_scope_id__ = "data-v-61c8b450";
366
+ const __vue_scope_id__ = "data-v-8536ff50";
369
367
  /* module identifier */
370
368
  const __vue_module_identifier__ = undefined;
371
369
  /* functional template */
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed } from 'vue-demi';
2
2
  import { debouncedWatch } from '@vueuse/core';
3
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
4
- import { _ as __vue_component__$1 } from './OrInput-9b87535a.js';
4
+ import { _ as __vue_component__$1 } from './OrInput-0dcfba2a.js';
5
5
  import { a as InputBoxSize } from './OrInputBox-208dceac.js';
6
6
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
7
7
 
@@ -1,4 +1,5 @@
1
- import { isVue3, defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
2
+ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
2
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
4
  import { u as useOverflow } from './useOverflow-ac506c65.js';
4
5
  import '@vueuse/core';
@@ -8,38 +9,13 @@ import { _ as __vue_component__$3 } from './OrExpansionPanel-ce82a6fd.js';
8
9
  import { _ as __vue_component__$4 } from './OrHint-44356417.js';
9
10
  import { _ as __vue_component__$5 } from './OrIcon-124f3bad.js';
10
11
  import { _ as __vue_component__$7, a as InputBoxSize } from './OrInputBox-208dceac.js';
11
- import { _ as __vue_component__$6 } from './OrInput-9b87535a.js';
12
+ import { _ as __vue_component__$6 } from './OrInput-0dcfba2a.js';
12
13
  import { _ as __vue_component__$8 } from './OrLabel-5670468e.js';
13
14
  import { _ as __vue_component__$9 } from './OrMenuItem-3a28db7b.js';
14
15
  import { _ as __vue_component__$a } from './OrPopover-9080fc00.js';
15
16
  import { _ as __vue_component__$b } from './OrTag-c42c3f9c.js';
16
17
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
17
18
 
18
- const created$1 = (element, binding) => {
19
- element.addEventListener('keydown', event => {
20
- event.preventDefault();
21
- if (['Escape'].includes(event.key)) {
22
- binding.value(event);
23
- }
24
- });
25
- };
26
- const DropdownClose = {
27
- [isVue3 ? 'created' : 'bind']: created$1
28
- };
29
-
30
- const created = (element, binding) => {
31
- element.addEventListener('keydown', event => {
32
- event.preventDefault();
33
- if (['Enter', ' '].includes(event.key)) {
34
- binding.value(event);
35
- }
36
- });
37
- element.addEventListener('click', binding.value);
38
- };
39
- const DropdownOpen = {
40
- [isVue3 ? 'created' : 'bind']: created
41
- };
42
-
43
19
  const SelectRoot = [
44
20
  // Layout
45
21
  'flex', 'flex-col',
@@ -247,11 +223,15 @@ var script = defineComponent({
247
223
  };
248
224
  });
249
225
  // Methods
250
- function open() {
226
+ function toggle() {
251
227
  if (!readonly.value && !props.disabled) {
252
228
  const popoverInstance = popover.value;
253
229
  if (popoverInstance) {
254
- popoverInstance.open();
230
+ if (popoverState.value === 'open') {
231
+ popoverInstance.close();
232
+ } else {
233
+ popoverInstance.open();
234
+ }
255
235
  }
256
236
  }
257
237
  }
@@ -293,7 +273,7 @@ var script = defineComponent({
293
273
  internalSearchOptions,
294
274
  resolvedSearchOptions,
295
275
  groupedOptions,
296
- open,
276
+ toggle,
297
277
  close,
298
278
  deselect,
299
279
  innerItems,
@@ -331,8 +311,8 @@ var __vue_render__ = function () {
331
311
  directives: [{
332
312
  name: "dropdown-open",
333
313
  rawName: "v-dropdown-open",
334
- value: _vm.open,
335
- expression: "open"
314
+ value: _vm.toggle,
315
+ expression: "toggle"
336
316
  }, {
337
317
  name: "dropdown-close",
338
318
  rawName: "v-dropdown-close",
@@ -34,7 +34,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
34
34
  }[]>;
35
35
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
36
36
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
37
- open: () => void;
37
+ toggle: () => void;
38
38
  close: () => void;
39
39
  deselect: (option: SelectOption) => void;
40
40
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -221,7 +221,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
221
221
  }[]>;
222
222
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
223
223
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
224
- open: () => void;
224
+ toggle: () => void;
225
225
  close: () => void;
226
226
  deselect: (option: SelectOption) => void;
227
227
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
@@ -0,0 +1,28 @@
1
+ import { isVue3 } from 'vue-demi';
2
+
3
+ const created$1 = (element, binding) => {
4
+ element.addEventListener('keydown', event => {
5
+ event.preventDefault();
6
+ if (['Escape'].includes(event.key)) {
7
+ binding.value(event);
8
+ }
9
+ });
10
+ };
11
+ const DropdownClose = {
12
+ [isVue3 ? 'created' : 'bind']: created$1
13
+ };
14
+
15
+ const created = (element, binding) => {
16
+ element.addEventListener('keydown', event => {
17
+ event.preventDefault();
18
+ if (['Enter', ' '].includes(event.key)) {
19
+ binding.value(event);
20
+ }
21
+ });
22
+ element.addEventListener('click', binding.value);
23
+ };
24
+ const DropdownOpen = {
25
+ [isVue3 ? 'created' : 'bind']: created
26
+ };
27
+
28
+ export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';
package/dist/v2/index.js CHANGED
@@ -18,7 +18,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-da64b7ee.js';
18
18
  export { _ as OrCollapse } from './OrCollapse-50e3914c.js';
19
19
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-0abe3636.js';
20
20
  export { _ as OrConfirm } from './OrConfirm-812badbf.js';
21
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-deb66787.js';
21
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-d561bf82.js';
22
22
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-63b2d841.js';
23
23
  export { _ as OrError } from './OrError-efc74907.js';
24
24
  export { _ as OrErrorTagV3 } from './OrErrorTag-9d592185.js';
@@ -36,7 +36,7 @@ export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-e754
36
36
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, _ as OrInlineTextEdit } from './OrInlineTextEdit-60227e46.js';
37
37
  export { _ as OrInlineTextareaV3 } from './OrInlineTextarea-7dc58bb1.js';
38
38
  export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, _ as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-208dceac.js';
39
- export { I as InputType, _ as OrInputV3 } from './OrInput-9b87535a.js';
39
+ export { I as InputType, _ as OrInputV3 } from './OrInput-0dcfba2a.js';
40
40
  export { a as OrNumberInput, b as OrPassword, _ as OrTextarea } from './OrPassword-a8b36c5b.js';
41
41
  export { _ as OrInput } from './OrSearch.vue_rollup-plugin-vue_styles.0-aafbcd86.js';
42
42
  export { _ as OrSearch } from './OrSearch-b228915a.js';
@@ -62,9 +62,9 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
62
62
  export { _ as OrRadio } from './OrRadio-514e8de8.js';
63
63
  export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
64
64
  export { _ as OrRadioV3 } from './OrRadio-4ba56887.js';
65
- export { _ as OrSearchV3 } from './OrSearch-8d97eb16.js';
65
+ export { _ as OrSearchV3 } from './OrSearch-45ea8c33.js';
66
66
  export { _ as OrSelect } from './OrSelect-ea27a70e.js';
67
- export { _ as OrSelectV3 } from './OrSelect-2d038a44.js';
67
+ export { _ as OrSelectV3 } from './OrSelect-b44cac14.js';
68
68
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-feacf13a.js';
69
69
  export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
70
70
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-38aef640.js';
@@ -92,6 +92,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-06654
92
92
  export { _ as OrTooltip } from './OrTooltip-b31bd78d.js';
93
93
  export { _ as OrTooltipContent } from './OrTooltip.vue_rollup-plugin-vue_styles.0-54c17910.js';
94
94
  export { _ as OrTooltipV3 } from './OrTooltip-caeac590.js';
95
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
95
96
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
96
97
  export { u as useElevation } from './useElevation-0e973238.js';
97
98
  export { u as useOverflow } from './useOverflow-ac506c65.js';
package/dist/v2/index2.js CHANGED
@@ -18,7 +18,7 @@ export { _ as OrCode, O as OrCodeLanguages } from './OrCode-da64b7ee.js';
18
18
  export { _ as OrCollapse } from './OrCollapse-50e3914c.js';
19
19
  export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-0abe3636.js';
20
20
  export { _ as OrConfirm } from './OrConfirm-812badbf.js';
21
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-deb66787.js';
21
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-d561bf82.js';
22
22
  export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-63b2d841.js';
23
23
  export { _ as OrError } from './OrError-efc74907.js';
24
24
  export { _ as OrErrorTagV3 } from './OrErrorTag-9d592185.js';
@@ -36,7 +36,7 @@ export { I as InlineInputType, _ as OrInlineInputV3 } from './OrInlineInput-e754
36
36
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, _ as OrInlineTextEdit } from './OrInlineTextEdit-60227e46.js';
37
37
  export { _ as OrInlineTextareaV3 } from './OrInlineTextarea-7dc58bb1.js';
38
38
  export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, _ as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-208dceac.js';
39
- export { I as InputType, _ as OrInputV3 } from './OrInput-9b87535a.js';
39
+ export { I as InputType, _ as OrInputV3 } from './OrInput-0dcfba2a.js';
40
40
  export { a as OrNumberInput, b as OrPassword, _ as OrTextarea } from './OrPassword-a8b36c5b.js';
41
41
  export { _ as OrInput } from './OrSearch.vue_rollup-plugin-vue_styles.0-aafbcd86.js';
42
42
  export { _ as OrSearch } from './OrSearch-b228915a.js';
@@ -62,9 +62,9 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
62
62
  export { _ as OrRadio } from './OrRadio-514e8de8.js';
63
63
  export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
64
64
  export { _ as OrRadioV3 } from './OrRadio-4ba56887.js';
65
- export { _ as OrSearchV3 } from './OrSearch-8d97eb16.js';
65
+ export { _ as OrSearchV3 } from './OrSearch-45ea8c33.js';
66
66
  export { _ as OrSelect } from './OrSelect-ea27a70e.js';
67
- export { _ as OrSelectV3 } from './OrSelect-2d038a44.js';
67
+ export { _ as OrSelectV3 } from './OrSelect-b44cac14.js';
68
68
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-feacf13a.js';
69
69
  export { O as OrSidebarPlacement, _ as OrSidebarV3 } from './OrSidebar-fabc7bc9.js';
70
70
  export { _ as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-38aef640.js';
@@ -117,6 +117,7 @@ import 'sortablejs';
117
117
  import './useElevation-0e973238.js';
118
118
  import './useResponsive-a02e95b7.js';
119
119
  import '@vueuse/integrations/useFocusTrap';
120
+ import './dropdown-open-0d314aa4.js';
120
121
  import './useOverflow-ac506c65.js';
121
122
  import 'vue';
122
123
  import 'portal-vue';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-deb66787.js';
1
+ export { C as ConfirmType, _ as OrConfirmV3 } from './OrConfirm-d561bf82.js';
2
2
  import 'vue-demi';
3
3
  import './OrButton-eb895669.js';
4
4
  import './useClassAttribute-47fdb016.js';
@@ -9,7 +9,7 @@ import './OrOverlay-4838a9b0.js';
9
9
  import './useElevation-0e973238.js';
10
10
  import './OrTeleport.vue2-fb92f29f.js';
11
11
  import 'portal-vue';
12
- import './OrInput-9b87535a.js';
12
+ import './OrInput-0dcfba2a.js';
13
13
  import './OrError-be656098.js';
14
14
  import './OrHint-44356417.js';
15
15
  import './OrIconButton-1b34f3fa.js';
@@ -1,4 +1,4 @@
1
- export { I as InputType, _ as OrInputV3 } from './OrInput-9b87535a.js';
1
+ export { I as InputType, _ as OrInputV3 } from './OrInput-0dcfba2a.js';
2
2
  export { a as InputSize } from './OrInputBox-208dceac.js';
3
3
  import 'vue-demi';
4
4
  import './useClassAttribute-47fdb016.js';
@@ -1,9 +1,9 @@
1
- export { _ as OrSearchV3 } from './OrSearch-8d97eb16.js';
1
+ export { _ as OrSearchV3 } from './OrSearch-45ea8c33.js';
2
2
  export { a as SearchSize } from './OrInputBox-208dceac.js';
3
3
  import 'vue-demi';
4
4
  import '@vueuse/core';
5
5
  import './useClassAttribute-47fdb016.js';
6
- import './OrInput-9b87535a.js';
6
+ import './OrInput-0dcfba2a.js';
7
7
  import './OrError-be656098.js';
8
8
  import './normalize-component-6e8e3d80.js';
9
9
  import './OrHint-44356417.js';
@@ -1,6 +1,7 @@
1
- export { _ as OrSelectV3 } from './OrSelect-2d038a44.js';
1
+ export { _ as OrSelectV3 } from './OrSelect-b44cac14.js';
2
2
  export { a as SelectSize } from './OrInputBox-208dceac.js';
3
3
  import 'vue-demi';
4
+ import './dropdown-open-0d314aa4.js';
4
5
  import './useClassAttribute-47fdb016.js';
5
6
  import './useOverflow-ac506c65.js';
6
7
  import '@vueuse/core';
@@ -12,7 +13,7 @@ import './OrError-be656098.js';
12
13
  import './OrExpansionPanel-ce82a6fd.js';
13
14
  import './OrIcon-124f3bad.js';
14
15
  import './OrHint-44356417.js';
15
- import './OrInput-9b87535a.js';
16
+ import './OrInput-0dcfba2a.js';
16
17
  import './OrIconButton-1b34f3fa.js';
17
18
  import './OrTooltip-caeac590.js';
18
19
  import './OrPopover-9080fc00.js';
@@ -1,7 +1,2 @@
1
- export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
- export { u as useElevation } from './useElevation-0e973238.js';
3
- export { u as useOverflow } from './useOverflow-ac506c65.js';
4
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
- export { u as useToggle } from './useToggle-29e4d7c7.js';
1
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
6
2
  import 'vue-demi';
7
- import '@vueuse/core';
@@ -1,3 +1,7 @@
1
+ export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
+ export { u as useElevation } from './useElevation-0e973238.js';
3
+ export { u as useOverflow } from './useOverflow-ac506c65.js';
1
4
  export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
5
+ export { u as useToggle } from './useToggle-29e4d7c7.js';
3
6
  import 'vue-demi';
7
+ import '@vueuse/core';
@@ -0,0 +1,3 @@
1
+ export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
+ import '@vueuse/core';
3
+ import 'vue-demi';
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed, watch } from 'vue-demi';
2
2
  import { s as script$2, a as ButtonColor } from './OrButton-12b36e89.js';
3
3
  import { s as script$1 } from './OrOverlay-27050c19.js';
4
- import { s as script$3 } from './OrInput-0a21591a.js';
4
+ import { s as script$3 } from './OrInput-f51916d4.js';
5
5
  import { useMagicKeys, whenever } from '@vueuse/core';
6
6
  import { logicAnd } from '@vueuse/math';
7
7
  import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, mergeProps, normalizeClass, renderSlot, createTextVNode, toDisplayString, createElementBlock, createVNode, createCommentVNode } from 'vue';
@@ -144,9 +144,6 @@ var script = defineComponent({
144
144
  });
145
145
 
146
146
  const _hoisted_1 = ["id", "type", "placeholder", "required", "disabled"];
147
- const _hoisted_2 = {
148
- class: /*#__PURE__*/normalizeClass(['-m-xs', 'ml-none'])
149
- };
150
147
  function render(_ctx, _cache, $props, $setup, $data, $options) {
151
148
  const _component_OrLabel = resolveComponent("OrLabel");
152
149
  const _component_OrIconButton = resolveComponent("OrIconButton");
@@ -189,7 +186,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
189
186
  onKeyup: _cache[2] || (_cache[2] = $event => _ctx.$emit('keyup', $event)),
190
187
  onFocus: _cache[3] || (_cache[3] = $event => _ctx.$emit('focus', $event)),
191
188
  onBlur: _cache[4] || (_cache[4] = $event => _ctx.$emit('blur', $event))
192
- }), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), createElementVNode("div", _hoisted_2, [_ctx.type === 'password' ? (openBlock(), createBlock(_component_OrIconButton, {
189
+ }), null, 16 /* FULL_PROPS */, _hoisted_1), [[vModelDynamic, _ctx.proxyModelValue]]), _ctx.type === 'password' ? (openBlock(), createBlock(_component_OrIconButton, {
193
190
  key: 0,
194
191
  icon: {
195
192
  icon: _ctx.disclosed ? 'visibility_off' : 'visibility',
@@ -210,7 +207,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
210
207
  key: 1,
211
208
  icon: 'search',
212
209
  variant: 'outlined'
213
- }))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)])]),
210
+ }))], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true)]),
214
211
  _: 1 /* STABLE */
215
212
  }, 8 /* PROPS */, ["variant", "size", "invalid", "readonly", "disabled"]), !_ctx.invalid ? (openBlock(), createBlock(_component_OrHint, {
216
213
  key: 1,
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, computed } from 'vue-demi';
2
2
  import { debouncedWatch } from '@vueuse/core';
3
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
4
- import { s as script$1 } from './OrInput-0a21591a.js';
4
+ import { s as script$1 } from './OrInput-f51916d4.js';
5
5
  import { a as InputBoxSize } from './OrInputBox-634230b1.js';
6
6
  import { resolveComponent, openBlock, createBlock, mergeProps } from 'vue';
7
7
 
@@ -1,4 +1,5 @@
1
- import { isVue3, defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, getCurrentInstance, ref, computed, onMounted, watch } from 'vue-demi';
2
+ import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
2
3
  import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
3
4
  import { u as useOverflow } from './useOverflow-ac506c65.js';
4
5
  import '@vueuse/core';
@@ -8,38 +9,13 @@ import { s as script$3 } from './OrExpansionPanel-1e2a6375.js';
8
9
  import { s as script$4 } from './OrHint-73835593.js';
9
10
  import { s as script$5 } from './OrIcon-b3906e35.js';
10
11
  import { s as script$7, a as InputBoxSize } from './OrInputBox-634230b1.js';
11
- import { s as script$6 } from './OrInput-0a21591a.js';
12
+ import { s as script$6 } from './OrInput-f51916d4.js';
12
13
  import { s as script$8 } from './OrLabel-7d4fe80b.js';
13
14
  import { s as script$9 } from './OrMenuItem-8773d073.js';
14
15
  import { s as script$a } from './OrPopover-3525c670.js';
15
16
  import { s as script$b } from './OrTag-60585386.js';
16
17
  import { resolveComponent, resolveDirective, openBlock, createElementBlock, mergeProps, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, normalizeClass, createElementVNode, Fragment, renderList, createVNode, withModifiers } from 'vue';
17
18
 
18
- const created$1 = (element, binding) => {
19
- element.addEventListener('keydown', event => {
20
- event.preventDefault();
21
- if (['Escape'].includes(event.key)) {
22
- binding.value(event);
23
- }
24
- });
25
- };
26
- const DropdownClose = {
27
- [isVue3 ? 'created' : 'bind']: created$1
28
- };
29
-
30
- const created = (element, binding) => {
31
- element.addEventListener('keydown', event => {
32
- event.preventDefault();
33
- if (['Enter', ' '].includes(event.key)) {
34
- binding.value(event);
35
- }
36
- });
37
- element.addEventListener('click', binding.value);
38
- };
39
- const DropdownOpen = {
40
- [isVue3 ? 'created' : 'bind']: created
41
- };
42
-
43
19
  const SelectRoot = [
44
20
  // Layout
45
21
  'flex', 'flex-col',
@@ -247,11 +223,15 @@ var script = defineComponent({
247
223
  };
248
224
  });
249
225
  // Methods
250
- function open() {
226
+ function toggle() {
251
227
  if (!readonly.value && !props.disabled) {
252
228
  const popoverInstance = popover.value;
253
229
  if (popoverInstance) {
254
- popoverInstance.open();
230
+ if (popoverState.value === 'open') {
231
+ popoverInstance.close();
232
+ } else {
233
+ popoverInstance.open();
234
+ }
255
235
  }
256
236
  }
257
237
  }
@@ -293,7 +273,7 @@ var script = defineComponent({
293
273
  internalSearchOptions,
294
274
  resolvedSearchOptions,
295
275
  groupedOptions,
296
- open,
276
+ toggle,
297
277
  close,
298
278
  deselect,
299
279
  innerItems,
@@ -484,7 +464,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
484
464
  _: 3 /* FORWARDED */
485
465
  }, 8 /* PROPS */, ["class", "trigger"])]),
486
466
  _: 3 /* FORWARDED */
487
- }, 8 /* PROPS */, ["class", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.open], [_directive_dropdown_close, _ctx.close]]), !_ctx.invalid ? (openBlock(), createBlock(_component_OrHint, {
467
+ }, 8 /* PROPS */, ["class", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), !_ctx.invalid ? (openBlock(), createBlock(_component_OrHint, {
488
468
  key: 1,
489
469
  disabled: _ctx.disabled
490
470
  }, {
@@ -34,7 +34,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
34
34
  }[]>;
35
35
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
36
36
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
37
- open: () => void;
37
+ toggle: () => void;
38
38
  close: () => void;
39
39
  deselect: (option: SelectOption) => void;
40
40
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -221,7 +221,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
221
221
  }[]>;
222
222
  resolvedSearchOptions: import("@vue/composition-api").ComputedRef<SelectOption[]>;
223
223
  groupedOptions: import("@vue/composition-api").ComputedRef<Record<string, SelectOption[]>>;
224
- open: () => void;
224
+ toggle: () => void;
225
225
  close: () => void;
226
226
  deselect: (option: SelectOption) => void;
227
227
  innerItems: import("@vue/composition-api").Ref<HTMLElement[]>;
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
@@ -0,0 +1,28 @@
1
+ import { isVue3 } from 'vue-demi';
2
+
3
+ const created$1 = (element, binding) => {
4
+ element.addEventListener('keydown', event => {
5
+ event.preventDefault();
6
+ if (['Escape'].includes(event.key)) {
7
+ binding.value(event);
8
+ }
9
+ });
10
+ };
11
+ const DropdownClose = {
12
+ [isVue3 ? 'created' : 'bind']: created$1
13
+ };
14
+
15
+ const created = (element, binding) => {
16
+ element.addEventListener('keydown', event => {
17
+ event.preventDefault();
18
+ if (['Enter', ' '].includes(event.key)) {
19
+ binding.value(event);
20
+ }
21
+ });
22
+ element.addEventListener('click', binding.value);
23
+ };
24
+ const DropdownOpen = {
25
+ [isVue3 ? 'created' : 'bind']: created
26
+ };
27
+
28
+ export { DropdownClose as D, DropdownOpen as a };
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';
package/dist/v3/index.js CHANGED
@@ -15,7 +15,7 @@ export { s as OrCode, O as OrCodeLanguages } from './OrCode-feeec003.js';
15
15
  export { s as OrCollapse } from './OrCollapse-37a52e8f.js';
16
16
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-0a944d25.js';
17
17
  export { s as OrConfirm } from './OrConfirm-00134f53.js';
18
- export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-118e052c.js';
18
+ export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-a9d3f157.js';
19
19
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-6c79a764.js';
20
20
  export { s as OrError } from './OrError-f90296db.js';
21
21
  export { s as OrErrorTagV3 } from './OrErrorTag-ceefd643.js';
@@ -33,7 +33,7 @@ export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-8f47
33
33
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-455a2d64.js';
34
34
  export { s as OrInlineTextareaV3 } from './OrInlineTextarea-86f4506d.js';
35
35
  export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-634230b1.js';
36
- export { I as InputType, s as OrInputV3 } from './OrInput-0a21591a.js';
36
+ export { I as InputType, s as OrInputV3 } from './OrInput-f51916d4.js';
37
37
  export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from './OrSearch-2874026c.js';
38
38
  export { s as OrLabel } from './OrLabel-876f8729.js';
39
39
  export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-7d4fe80b.js';
@@ -57,9 +57,9 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
57
57
  export { s as OrRadio } from './OrRadio-c3ab11f2.js';
58
58
  export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
59
59
  export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
60
- export { s as OrSearchV3 } from './OrSearch-8af88170.js';
60
+ export { s as OrSearchV3 } from './OrSearch-e27cadbf.js';
61
61
  export { s as OrSelect } from './OrSelect-056731af.js';
62
- export { s as OrSelectV3 } from './OrSelect-32207997.js';
62
+ export { s as OrSelectV3 } from './OrSelect-9d821ef2.js';
63
63
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
64
64
  export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
65
65
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
@@ -86,6 +86,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-e
86
86
  export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
87
87
  export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-121eae2b.js';
88
88
  export { s as OrTooltipV3 } from './OrTooltip-30e05f9e.js';
89
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
89
90
  export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
90
91
  export { u as useElevation } from './useElevation-0e973238.js';
91
92
  export { u as useOverflow } from './useOverflow-ac506c65.js';
package/dist/v3/index2.js CHANGED
@@ -15,7 +15,7 @@ export { s as OrCode, O as OrCodeLanguages } from './OrCode-feeec003.js';
15
15
  export { s as OrCollapse } from './OrCollapse-37a52e8f.js';
16
16
  export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-0a944d25.js';
17
17
  export { s as OrConfirm } from './OrConfirm-00134f53.js';
18
- export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-118e052c.js';
18
+ export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-a9d3f157.js';
19
19
  export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-6c79a764.js';
20
20
  export { s as OrError } from './OrError-f90296db.js';
21
21
  export { s as OrErrorTagV3 } from './OrErrorTag-ceefd643.js';
@@ -33,7 +33,7 @@ export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-8f47
33
33
  export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-455a2d64.js';
34
34
  export { s as OrInlineTextareaV3 } from './OrInlineTextarea-86f4506d.js';
35
35
  export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-634230b1.js';
36
- export { I as InputType, s as OrInputV3 } from './OrInput-0a21591a.js';
36
+ export { I as InputType, s as OrInputV3 } from './OrInput-f51916d4.js';
37
37
  export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from './OrSearch-2874026c.js';
38
38
  export { s as OrLabel } from './OrLabel-876f8729.js';
39
39
  export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-7d4fe80b.js';
@@ -57,9 +57,9 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
57
57
  export { s as OrRadio } from './OrRadio-c3ab11f2.js';
58
58
  export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
59
59
  export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
60
- export { s as OrSearchV3 } from './OrSearch-8af88170.js';
60
+ export { s as OrSearchV3 } from './OrSearch-e27cadbf.js';
61
61
  export { s as OrSelect } from './OrSelect-056731af.js';
62
- export { s as OrSelectV3 } from './OrSelect-32207997.js';
62
+ export { s as OrSelectV3 } from './OrSelect-9d821ef2.js';
63
63
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
64
64
  export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
65
65
  export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
@@ -111,4 +111,5 @@ import 'sortablejs';
111
111
  import './useElevation-0e973238.js';
112
112
  import './useResponsive-a02e95b7.js';
113
113
  import '@vueuse/integrations/useFocusTrap';
114
+ import './dropdown-open-0d314aa4.js';
114
115
  import './useOverflow-ac506c65.js';
@@ -1,4 +1,4 @@
1
- export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-118e052c.js';
1
+ export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-a9d3f157.js';
2
2
  import 'vue-demi';
3
3
  import './OrButton-12b36e89.js';
4
4
  import './useClassAttribute-47fdb016.js';
@@ -8,7 +8,7 @@ import 'vue';
8
8
  import './OrOverlay-27050c19.js';
9
9
  import './useElevation-0e973238.js';
10
10
  import './OrTeleport.vue3-8099178c.js';
11
- import './OrInput-0a21591a.js';
11
+ import './OrInput-f51916d4.js';
12
12
  import './OrError-19a62a18.js';
13
13
  import './OrHint-73835593.js';
14
14
  import './OrIconButton-f9226adf.js';
@@ -1,4 +1,4 @@
1
- export { I as InputType, s as OrInputV3 } from './OrInput-0a21591a.js';
1
+ export { I as InputType, s as OrInputV3 } from './OrInput-f51916d4.js';
2
2
  export { a as InputSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
4
  import './useClassAttribute-47fdb016.js';
@@ -1,9 +1,9 @@
1
- export { s as OrSearchV3 } from './OrSearch-8af88170.js';
1
+ export { s as OrSearchV3 } from './OrSearch-e27cadbf.js';
2
2
  export { a as SearchSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
4
  import '@vueuse/core';
5
5
  import './useClassAttribute-47fdb016.js';
6
- import './OrInput-0a21591a.js';
6
+ import './OrInput-f51916d4.js';
7
7
  import './OrError-19a62a18.js';
8
8
  import 'vue';
9
9
  import './OrHint-73835593.js';
@@ -1,6 +1,7 @@
1
- export { s as OrSelectV3 } from './OrSelect-32207997.js';
1
+ export { s as OrSelectV3 } from './OrSelect-9d821ef2.js';
2
2
  export { a as SelectSize } from './OrInputBox-634230b1.js';
3
3
  import 'vue-demi';
4
+ import './dropdown-open-0d314aa4.js';
4
5
  import './useClassAttribute-47fdb016.js';
5
6
  import './useOverflow-ac506c65.js';
6
7
  import '@vueuse/core';
@@ -12,7 +13,7 @@ import './OrError-19a62a18.js';
12
13
  import './OrExpansionPanel-1e2a6375.js';
13
14
  import './OrIcon-b3906e35.js';
14
15
  import './OrHint-73835593.js';
15
- import './OrInput-0a21591a.js';
16
+ import './OrInput-f51916d4.js';
16
17
  import './OrIconButton-f9226adf.js';
17
18
  import './OrTooltip-30e05f9e.js';
18
19
  import './OrPopover-3525c670.js';
@@ -1,7 +1,2 @@
1
- export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
- export { u as useElevation } from './useElevation-0e973238.js';
3
- export { u as useOverflow } from './useOverflow-ac506c65.js';
4
- export { u as useResponsive } from './useResponsive-a02e95b7.js';
5
- export { u as useToggle } from './useToggle-29e4d7c7.js';
1
+ export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
6
2
  import 'vue-demi';
7
- import '@vueuse/core';
@@ -1,3 +1,7 @@
1
+ export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
2
+ export { u as useElevation } from './useElevation-0e973238.js';
3
+ export { u as useOverflow } from './useOverflow-ac506c65.js';
1
4
  export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
- import '@vueuse/core';
5
+ export { u as useToggle } from './useToggle-29e4d7c7.js';
3
6
  import 'vue-demi';
7
+ import '@vueuse/core';
@@ -0,0 +1,3 @@
1
+ export { u as useResponsive } from './useResponsive-a02e95b7.js';
2
+ import '@vueuse/core';
3
+ import 'vue-demi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "2.62.3-beta.1901.0",
3
+ "version": "2.62.3-beta.1903.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -41,34 +41,32 @@
41
41
  @blur="$emit('blur', $event)"
42
42
  >
43
43
 
44
- <div :class="['-m-xs', 'ml-none']">
45
- <template v-if="type === 'password'">
44
+ <template v-if="type === 'password'">
45
+ <OrIconButton
46
+ :icon="{ icon: disclosed ? 'visibility_off' : 'visibility', variant: 'filled' }"
47
+ :color="'inherit'"
48
+ :disabled="disabled"
49
+ @click.stop="disclosed = !disclosed"
50
+ />
51
+ </template>
52
+
53
+ <template v-if="type === 'search'">
54
+ <template v-if="modelValue">
46
55
  <OrIconButton
47
- :icon="{ icon: disclosed ? 'visibility_off' : 'visibility', variant: 'filled' }"
56
+ :icon="'close'"
48
57
  :color="'inherit'"
49
58
  :disabled="disabled"
50
- @click.stop="disclosed = !disclosed"
59
+ @click.stop="$emit('update:modelValue', '')"
51
60
  />
52
61
  </template>
53
62
 
54
- <template v-if="type === 'search'">
55
- <template v-if="modelValue">
56
- <OrIconButton
57
- :icon="'close'"
58
- :color="'inherit'"
59
- :disabled="disabled"
60
- @click.stop="$emit('update:modelValue', '')"
61
- />
62
- </template>
63
-
64
- <template v-else>
65
- <OrIcon
66
- :icon="'search'"
67
- :variant="'outlined'"
68
- />
69
- </template>
63
+ <template v-else>
64
+ <OrIcon
65
+ :icon="'search'"
66
+ :variant="'outlined'"
67
+ />
70
68
  </template>
71
- </div>
69
+ </template>
72
70
  </OrInputBox>
73
71
 
74
72
  <template v-if="!invalid">
@@ -21,7 +21,7 @@
21
21
 
22
22
  <OrInputBox
23
23
  ref="inputBox"
24
- v-dropdown-open="open"
24
+ v-dropdown-open="toggle"
25
25
  v-dropdown-close="close"
26
26
  :class="[popoverState === 'open' && 'rounded-b-0']"
27
27
  :size="size"
@@ -208,8 +208,7 @@
208
208
 
209
209
  <script lang="ts">
210
210
  import { computed, defineComponent, getCurrentInstance, onMounted, PropType, ref, watch } from 'vue-demi';
211
- import { DropdownClose } from '../../directives/dropdown-close';
212
- import { DropdownOpen } from '../../directives/dropdown-open';
211
+ import { DropdownClose, DropdownOpen } from '../../directives';
213
212
  import { useClassAttribute, useOverflow } from '../../hooks';
214
213
  import { OrCheckboxV3 as OrCheckbox } from '../or-checkbox-v3';
215
214
  import { OrErrorV3 as OrError } from '../or-error-v3';
@@ -465,12 +464,16 @@ export default defineComponent({
465
464
  });
466
465
 
467
466
  // Methods
468
- function open(): void {
467
+ function toggle(): void {
469
468
  if (!readonly.value && !props.disabled) {
470
469
  const popoverInstance = popover.value;
471
470
 
472
471
  if (popoverInstance) {
473
- (popoverInstance.open as () => void)();
472
+ if (popoverState.value === 'open') {
473
+ (popoverInstance.close as () => void)();
474
+ } else {
475
+ (popoverInstance.open as () => void)();
476
+ }
474
477
  }
475
478
  }
476
479
  }
@@ -515,7 +518,7 @@ export default defineComponent({
515
518
  internalSearchOptions,
516
519
  resolvedSearchOptions,
517
520
  groupedOptions,
518
- open,
521
+ toggle,
519
522
  close,
520
523
  deselect,
521
524
  innerItems,
@@ -0,0 +1,2 @@
1
+ export * from './dropdown-close';
2
+ export * from './dropdown-open';
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
+ export * from './directives';
2
3
  export * from './hooks';
3
4
  export * from './utils/functions/text';