@onereach/ui-components 2.67.9 → 2.67.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/{OrSearch-f6d5fc65.js → OrSearch-9f797381.js} +7 -2
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-b254e34c.js → OrSearch.vue_vue_type_script_lang-b022defa.js} +7 -2
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +2 -2
- package/dist/esm/v2/{OrSearch-42454def.js → OrSearch-abaffb95.js} +7 -2
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +1 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrSearch-2912b7df.js → OrSearch-b56a418c.js} +7 -2
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -2
- package/src/components/or-search-v3/OrSearch.stories3.ts +6 -0
- package/src/components/or-search-v3/OrSearch.vue +8 -1
|
@@ -2,7 +2,7 @@ import './index-fa6eb4ca.js';
|
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import { O as OrInput } from './OrInput-cdd93d29.js';
|
|
4
4
|
import { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
|
|
5
|
-
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
5
|
+
import { defineComponent, ref, computed, watch } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
6
6
|
import { a as InputBoxSize } from './OrInputBox-7069052f.js';
|
|
7
7
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
8
8
|
|
|
@@ -34,7 +34,7 @@ var script = defineComponent({
|
|
|
34
34
|
default: false
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
37
|
+
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
|
|
38
38
|
expose: ['root', 'focus', 'clear'],
|
|
39
39
|
setup(props, context) {
|
|
40
40
|
// Refs
|
|
@@ -48,6 +48,11 @@ var script = defineComponent({
|
|
|
48
48
|
debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
|
|
49
49
|
debounce: props.debounce
|
|
50
50
|
});
|
|
51
|
+
watch(localModelValue, (val, beforeVal) => {
|
|
52
|
+
if (val.length === 0 && beforeVal.length > 0) {
|
|
53
|
+
context.emit('clear');
|
|
54
|
+
}
|
|
55
|
+
});
|
|
51
56
|
// Methods
|
|
52
57
|
function focus() {
|
|
53
58
|
var _a;
|
|
@@ -63,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
63
63
|
export { _ as OrRadio } from '../OrRadio-187d6fc7.js';
|
|
64
64
|
export { _ as OrRadioGroup } from '../OrRadioGroup-aa9f0757.js';
|
|
65
65
|
export { _ as OrRadioV3 } from '../OrRadio-8ec1d487.js';
|
|
66
|
-
export { _ as OrSearchV3 } from '../OrSearch-
|
|
66
|
+
export { _ as OrSearchV3 } from '../OrSearch-9f797381.js';
|
|
67
67
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-65c87f9b.js';
|
|
68
68
|
export { _ as OrSelect } from '../OrSelect-a23d4210.js';
|
|
69
69
|
export { _ as OrSelectV3 } from '../OrSelect-6cef1b69.js';
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
68
68
|
export { _ as OrRadio } from './OrRadio-187d6fc7.js';
|
|
69
69
|
export { _ as OrRadioGroup } from './OrRadioGroup-aa9f0757.js';
|
|
70
70
|
export { _ as OrRadioV3 } from './OrRadio-8ec1d487.js';
|
|
71
|
-
export { _ as OrSearchV3 } from './OrSearch-
|
|
71
|
+
export { _ as OrSearchV3 } from './OrSearch-9f797381.js';
|
|
72
72
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-65c87f9b.js';
|
|
73
73
|
export { _ as OrSelect } from './OrSelect-a23d4210.js';
|
|
74
74
|
export { _ as OrSelectV3 } from './OrSelect-6cef1b69.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue';
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import './OrInput-33571984.js';
|
|
4
4
|
import { u as useClassAttribute } from './useClassAttribute-00888f78.js';
|
|
@@ -33,7 +33,7 @@ var script = defineComponent({
|
|
|
33
33
|
default: false
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
36
|
+
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
|
|
37
37
|
expose: ['root', 'focus', 'clear'],
|
|
38
38
|
setup(props, context) {
|
|
39
39
|
// Refs
|
|
@@ -47,6 +47,11 @@ var script = defineComponent({
|
|
|
47
47
|
debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
|
|
48
48
|
debounce: props.debounce
|
|
49
49
|
});
|
|
50
|
+
watch(localModelValue, (val, beforeVal) => {
|
|
51
|
+
if (val.length === 0 && beforeVal.length > 0) {
|
|
52
|
+
context.emit('clear');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
50
55
|
// Methods
|
|
51
56
|
function focus() {
|
|
52
57
|
var _a;
|
|
@@ -63,7 +63,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
63
63
|
export { s as OrRadio } from '../OrRadio.vue_vue_type_script_lang-c956b54b.js';
|
|
64
64
|
export { s as OrRadioGroup } from '../OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
|
|
65
65
|
export { s as OrRadioV3 } from '../OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
66
|
-
export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-
|
|
66
|
+
export { s as OrSearchV3 } from '../OrSearch.vue_vue_type_script_lang-b022defa.js';
|
|
67
67
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
68
68
|
export { s as OrSelect } from '../OrSelect.vue_vue_type_script_lang-26c0a70a.js';
|
|
69
69
|
export { s as OrSelectV3 } from '../OrSelect.vue_vue_type_script_lang-e6be732c.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-
|
|
1
|
+
export { s as OrSearchV3 } from '../../OrSearch.vue_vue_type_script_lang-b022defa.js';
|
|
2
2
|
export { a as SearchSize } from '../../OrInputBox.vue_vue_type_script_lang-760097b4.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import '@vueuse/core';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -83,8 +83,8 @@ import { s as script$r } from './OrRadioGroup.vue_vue_type_script_lang-caea7bcb.
|
|
|
83
83
|
export { s as OrRadioGroup } from './OrRadioGroup.vue_vue_type_script_lang-caea7bcb.js';
|
|
84
84
|
import { s as script$s } from './OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
85
85
|
export { s as OrRadioV3 } from './OrRadio.vue_vue_type_script_lang-e64b14a1.js';
|
|
86
|
-
import { s as script$t } from './OrSearch.vue_vue_type_script_lang-
|
|
87
|
-
export { s as OrSearchV3 } from './OrSearch.vue_vue_type_script_lang-
|
|
86
|
+
import { s as script$t } from './OrSearch.vue_vue_type_script_lang-b022defa.js';
|
|
87
|
+
export { s as OrSearchV3 } from './OrSearch.vue_vue_type_script_lang-b022defa.js';
|
|
88
88
|
import { s as script$u } from './OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
89
89
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl.vue_vue_type_script_lang-6068f70c.js';
|
|
90
90
|
import { s as script$x } from './OrSidebar.vue_vue_type_script_lang-7c55ac0a.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
4
|
import { _ as __vue_component__$1 } from './OrInput-6e7e582e.js';
|
|
@@ -33,7 +33,7 @@ var script = defineComponent({
|
|
|
33
33
|
default: false
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
36
|
+
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
|
|
37
37
|
expose: ['root', 'focus', 'clear'],
|
|
38
38
|
setup(props, context) {
|
|
39
39
|
// Refs
|
|
@@ -47,6 +47,11 @@ var script = defineComponent({
|
|
|
47
47
|
debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
|
|
48
48
|
debounce: props.debounce
|
|
49
49
|
});
|
|
50
|
+
watch(localModelValue, (val, beforeVal) => {
|
|
51
|
+
if (val.length === 0 && beforeVal.length > 0) {
|
|
52
|
+
context.emit('clear');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
50
55
|
// Methods
|
|
51
56
|
function focus() {
|
|
52
57
|
var _a;
|
|
@@ -63,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
63
63
|
export { _ as OrRadio } from '../OrRadio-e4198532.js';
|
|
64
64
|
export { _ as OrRadioGroup } from '../OrRadioGroup-d9d32cba.js';
|
|
65
65
|
export { _ as OrRadioV3 } from '../OrRadio-19d01c00.js';
|
|
66
|
-
export { _ as OrSearchV3 } from '../OrSearch-
|
|
66
|
+
export { _ as OrSearchV3 } from '../OrSearch-abaffb95.js';
|
|
67
67
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-0b4637ba.js';
|
|
68
68
|
export { _ as OrSelect } from '../OrSelect-dae2b069.js';
|
|
69
69
|
export { _ as OrSelectV3 } from '../OrSelect-439f27b9.js';
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -63,7 +63,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
63
63
|
export { _ as OrRadio } from './OrRadio-e4198532.js';
|
|
64
64
|
export { _ as OrRadioGroup } from './OrRadioGroup-d9d32cba.js';
|
|
65
65
|
export { _ as OrRadioV3 } from './OrRadio-19d01c00.js';
|
|
66
|
-
export { _ as OrSearchV3 } from './OrSearch-
|
|
66
|
+
export { _ as OrSearchV3 } from './OrSearch-abaffb95.js';
|
|
67
67
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-0b4637ba.js';
|
|
68
68
|
export { _ as OrSelect } from './OrSelect-dae2b069.js';
|
|
69
69
|
export { _ as OrSelectV3 } from './OrSelect-439f27b9.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from 'vue-demi';
|
|
1
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi';
|
|
2
2
|
import { debouncedWatch } from '@vueuse/core';
|
|
3
3
|
import { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
4
4
|
import { s as script$1 } from './OrInput-5672f47b.js';
|
|
@@ -33,7 +33,7 @@ var script = defineComponent({
|
|
|
33
33
|
default: false
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur'],
|
|
36
|
+
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
|
|
37
37
|
expose: ['root', 'focus', 'clear'],
|
|
38
38
|
setup(props, context) {
|
|
39
39
|
// Refs
|
|
@@ -47,6 +47,11 @@ var script = defineComponent({
|
|
|
47
47
|
debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
|
|
48
48
|
debounce: props.debounce
|
|
49
49
|
});
|
|
50
|
+
watch(localModelValue, (val, beforeVal) => {
|
|
51
|
+
if (val.length === 0 && beforeVal.length > 0) {
|
|
52
|
+
context.emit('clear');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
50
55
|
// Methods
|
|
51
56
|
function focus() {
|
|
52
57
|
var _a;
|
|
@@ -58,7 +58,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
58
58
|
export { s as OrRadio } from '../OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from '../OrRadio-0c1883f2.js';
|
|
61
|
-
export { s as OrSearchV3 } from '../OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from '../OrSearch-b56a418c.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-cdf00d49.js';
|
|
63
63
|
export { s as OrSelect } from '../OrSelect-0821b907.js';
|
|
64
64
|
export { s as OrSelectV3 } from '../OrSelect-ff8f8461.js';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrPr
|
|
|
58
58
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
59
59
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
60
60
|
export { s as OrRadioV3 } from './OrRadio-0c1883f2.js';
|
|
61
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
61
|
+
export { s as OrSearchV3 } from './OrSearch-b56a418c.js';
|
|
62
62
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-cdf00d49.js';
|
|
63
63
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
64
64
|
export { s as OrSelectV3 } from './OrSelect-ff8f8461.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.67.
|
|
3
|
+
"version": "2.67.10",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
},
|
|
125
125
|
"./package.json": "./package.json"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "da76e43453bbde55f414aca25f01e1cf653b1a70"
|
|
128
128
|
}
|
|
@@ -68,6 +68,10 @@ export default {
|
|
|
68
68
|
blur: {
|
|
69
69
|
table: { disable: true },
|
|
70
70
|
},
|
|
71
|
+
|
|
72
|
+
clear: {
|
|
73
|
+
table: { disable: true },
|
|
74
|
+
},
|
|
71
75
|
},
|
|
72
76
|
|
|
73
77
|
parameters: {
|
|
@@ -93,6 +97,7 @@ const Template: StoryFn<typeof OrSearch> = (args) => ({
|
|
|
93
97
|
onKeyup: action('keyup'),
|
|
94
98
|
onFocus: action('focus'),
|
|
95
99
|
onBlur: action('blur'),
|
|
100
|
+
onClear: action('clear'),
|
|
96
101
|
};
|
|
97
102
|
},
|
|
98
103
|
|
|
@@ -106,6 +111,7 @@ const Template: StoryFn<typeof OrSearch> = (args) => ({
|
|
|
106
111
|
@keyup="onKeyup"
|
|
107
112
|
@focus="onFocus"
|
|
108
113
|
@blur="onBlur"
|
|
114
|
+
@clear="onClear"
|
|
109
115
|
/>
|
|
110
116
|
`,
|
|
111
117
|
});
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
22
|
+
import { computed, watch, defineComponent, PropType, ref } from 'vue-demi';
|
|
23
23
|
import { debouncedWatch } from '@vueuse/core';
|
|
24
24
|
import { useClassAttribute } from '../../hooks';
|
|
25
25
|
import { OrInputV3 as OrInput } from '../or-input-v3';
|
|
@@ -68,6 +68,7 @@ export default defineComponent({
|
|
|
68
68
|
'keyup',
|
|
69
69
|
'focus',
|
|
70
70
|
'blur',
|
|
71
|
+
'clear',
|
|
71
72
|
],
|
|
72
73
|
|
|
73
74
|
expose: [
|
|
@@ -98,6 +99,12 @@ export default defineComponent({
|
|
|
98
99
|
{ debounce: props.debounce },
|
|
99
100
|
);
|
|
100
101
|
|
|
102
|
+
watch(localModelValue, (val, beforeVal) => {
|
|
103
|
+
if (val.length === 0 && beforeVal.length > 0) {
|
|
104
|
+
context.emit('clear');
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
101
108
|
// Methods
|
|
102
109
|
function focus(): void {
|
|
103
110
|
(root.value as { focus: () => void; } | undefined)?.focus(); // fixes error TS2349
|