@onereach/ui-components 2.71.1 → 2.71.2-beta.2238.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 (148) hide show
  1. package/dist/bundled/v2/{OrCardCollection-89428bbf.js → OrCardCollection-166cfcc6.js} +5 -5
  2. package/dist/bundled/v2/{OrConfirm-56d01cff.js → OrConfirm-55b89b17.js} +4 -4
  3. package/dist/bundled/v2/{OrListOfInputs-8f076650.js → OrListOfInputs-ab7f9d97.js} +4 -4
  4. package/dist/bundled/v2/OrNumberInput-face8ccc.js +227 -0
  5. package/dist/bundled/v2/OrPassword-a818e7b5.js +227 -0
  6. package/dist/bundled/v2/{OrSearch-f7cfa52f.js → OrSearch-832d7978.js} +4 -4
  7. package/dist/bundled/v2/{OrPassword-7da938aa.js → OrTextarea-71ff236d.js} +7 -449
  8. package/dist/bundled/v2/components/index.d.ts +5 -1
  9. package/dist/bundled/v2/components/index.js +9 -7
  10. package/dist/bundled/v2/components/or-card-collection/index.js +4 -4
  11. package/dist/bundled/v2/components/or-confirm/index.js +2 -2
  12. package/dist/bundled/v2/components/or-input/index.d.ts +1 -0
  13. package/dist/bundled/v2/components/or-input/index.js +13 -0
  14. package/dist/bundled/v2/components/or-list-of-inputs/index.js +2 -2
  15. package/dist/bundled/v2/components/or-number-input/index.d.ts +1 -0
  16. package/dist/bundled/v2/components/or-number-input/index.js +14 -0
  17. package/dist/bundled/v2/components/or-password/index.d.ts +1 -0
  18. package/dist/bundled/v2/components/{or-inputs → or-password}/index.js +3 -4
  19. package/dist/bundled/v2/components/or-search/index.d.ts +1 -0
  20. package/dist/bundled/v2/components/or-search/index.js +25 -0
  21. package/dist/bundled/v2/components/or-textarea/index.d.ts +1 -0
  22. package/dist/bundled/v2/components/or-textarea/index.js +13 -0
  23. package/dist/bundled/v2/index.js +8 -6
  24. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-d8124dda.js → OrCardCollection.vue_vue_type_script_lang-cd84f344.js} +4 -4
  25. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-0f16fc67.js → OrConfirm.vue_vue_type_script_lang-41b4d791.js} +2 -1
  26. package/dist/bundled/v3/{OrInput-7d4b571a.js → OrInput-704e72ba.js} +5 -193
  27. package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-409235cc.js +190 -0
  28. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-62dbf1e7.js → OrListOfInputs.vue_vue_type_script_lang-6c5cf7a5.js} +2 -1
  29. package/dist/bundled/v3/OrNumberInput.vue_vue_type_script_lang-f061d829.js +113 -0
  30. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-b75f6543.js +99 -0
  31. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-16fbccc0.js → OrSearch.vue_vue_type_script_lang-5356fa79.js} +2 -1
  32. package/dist/bundled/v3/OrTextarea.vue_vue_type_script_lang-69ea22e9.js +187 -0
  33. package/dist/bundled/v3/components/index.d.ts +5 -1
  34. package/dist/bundled/v3/components/index.js +10 -7
  35. package/dist/bundled/v3/components/or-card-collection/index.js +5 -4
  36. package/dist/bundled/v3/components/or-confirm/index.js +3 -2
  37. package/dist/bundled/v3/components/or-input/index.d.ts +1 -0
  38. package/dist/bundled/v3/components/or-input/index.js +14 -0
  39. package/dist/bundled/v3/components/or-list-of-inputs/index.js +3 -2
  40. package/dist/bundled/v3/components/or-number-input/index.d.ts +1 -0
  41. package/dist/bundled/v3/components/or-number-input/index.js +16 -0
  42. package/dist/bundled/v3/components/or-password/index.d.ts +1 -0
  43. package/dist/bundled/v3/components/or-password/index.js +31 -0
  44. package/dist/bundled/v3/components/or-search/index.d.ts +1 -0
  45. package/dist/bundled/v3/components/{or-inputs → or-search}/index.js +4 -5
  46. package/dist/bundled/v3/components/or-textarea/index.d.ts +1 -0
  47. package/dist/bundled/v3/components/or-textarea/index.js +14 -0
  48. package/dist/bundled/v3/index.js +658 -653
  49. package/dist/esm/v2/{OrCardCollection-f6b07557.js → OrCardCollection-19582949.js} +6 -7
  50. package/dist/esm/v2/{OrConfirm-d7112dd3.js → OrConfirm-ede619eb.js} +4 -4
  51. package/dist/esm/v2/{OrSearch.vue_rollup-plugin-vue_script-197d77fc.js → OrInput-6e6cfd11.js} +4 -492
  52. package/dist/esm/v2/{OrListOfInputs-50aa1ef1.js → OrListOfInputs-4298fa2c.js} +5 -5
  53. package/dist/esm/v2/OrNumberInput-b20d75d2.js +225 -0
  54. package/dist/esm/v2/OrPassword-e6d5e968.js +225 -0
  55. package/dist/esm/v2/{OrSearch-0589d17d.js → OrSearch-b4f4d59b.js} +122 -5
  56. package/dist/esm/v2/{OrPassword-1fa97156.js → OrTextarea-91a95068.js} +187 -245
  57. package/dist/esm/v2/components/index.d.ts +5 -1
  58. package/dist/esm/v2/components/index.js +9 -7
  59. package/dist/esm/v2/components/or-card-collection/index.js +3 -4
  60. package/dist/esm/v2/components/or-confirm/index.js +2 -3
  61. package/dist/esm/v2/components/or-input/index.d.ts +1 -0
  62. package/dist/esm/v2/components/or-input/index.js +11 -0
  63. package/dist/esm/v2/components/or-list-of-inputs/index.js +2 -4
  64. package/dist/esm/v2/components/or-number-input/index.d.ts +1 -0
  65. package/dist/esm/v2/components/or-number-input/index.js +12 -0
  66. package/dist/esm/v2/components/or-password/index.d.ts +1 -0
  67. package/dist/esm/v2/components/{or-inputs → or-password}/index.js +5 -6
  68. package/dist/esm/v2/components/or-search/index.d.ts +1 -0
  69. package/dist/esm/v2/components/or-search/index.js +23 -0
  70. package/dist/esm/v2/components/or-textarea/index.d.ts +1 -0
  71. package/dist/esm/v2/components/or-textarea/index.js +11 -0
  72. package/dist/esm/v2/index.js +8 -6
  73. package/dist/esm/v3/{OrCardCollection-a5e326ef.js → OrCardCollection-1e44c758.js} +2 -2
  74. package/dist/esm/v3/{OrConfirm-f39bd784.js → OrConfirm-c11ee2ec.js} +1 -1
  75. package/dist/esm/v3/OrInput-81125804.js +295 -0
  76. package/dist/esm/v3/{OrListOfInputs-7a67440f.js → OrListOfInputs-508e056f.js} +1 -1
  77. package/dist/esm/v3/OrNumberInput-b32b5ce3.js +170 -0
  78. package/dist/esm/v3/OrPassword-b0cbb578.js +162 -0
  79. package/dist/esm/v3/OrSearch-11fdf667.js +188 -0
  80. package/dist/esm/v3/OrTextarea-1f5c3be1.js +290 -0
  81. package/dist/esm/v3/components/index.d.ts +5 -1
  82. package/dist/esm/v3/components/index.js +9 -5
  83. package/dist/esm/v3/components/or-card-collection/index.js +3 -3
  84. package/dist/esm/v3/components/or-confirm/index.js +2 -3
  85. package/dist/esm/v3/components/or-input/index.d.ts +1 -0
  86. package/dist/esm/v3/components/or-input/index.js +11 -0
  87. package/dist/esm/v3/components/or-list-of-inputs/index.js +2 -4
  88. package/dist/esm/v3/components/or-number-input/index.d.ts +1 -0
  89. package/dist/esm/v3/components/or-number-input/index.js +12 -0
  90. package/dist/esm/v3/components/or-password/index.d.ts +1 -0
  91. package/dist/esm/v3/components/{or-inputs → or-password}/index.js +3 -2
  92. package/dist/esm/v3/components/or-search/index.d.ts +1 -0
  93. package/dist/esm/v3/components/or-search/index.js +20 -0
  94. package/dist/esm/v3/components/or-textarea/index.d.ts +1 -0
  95. package/dist/esm/v3/components/or-textarea/index.js +11 -0
  96. package/dist/esm/v3/index.js +8 -4
  97. package/package.json +2 -3
  98. package/src/components/index.ts +5 -1
  99. package/src/components/or-card-collection/OrCardCollection.vue +8 -8
  100. package/src/components/or-confirm/OrConfirm.vue +1 -1
  101. package/src/components/or-input/index.ts +1 -0
  102. package/src/components/or-list/OrList.stories.ts +1 -1
  103. package/src/components/or-list-of-inputs/OrListOfInputs.vue +1 -1
  104. package/src/components/or-modal/OrModal.stories.ts +1 -1
  105. package/src/components/{or-inputs → or-number-input}/OrNumberInput.vue +1 -1
  106. package/src/components/or-number-input/index.ts +1 -0
  107. package/src/components/{or-inputs → or-password}/OrPassword.vue +1 -1
  108. package/src/components/or-password/index.ts +1 -0
  109. package/src/components/{or-inputs → or-search}/OrSearch.vue +1 -1
  110. package/src/components/or-search/index.ts +1 -0
  111. package/src/components/{or-inputs → or-textarea}/OrTextarea.vue +225 -6
  112. package/src/components/or-textarea/index.ts +1 -0
  113. package/dist/bundled/v2/components/or-inputs/index.d.ts +0 -5
  114. package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-13bc5b00.js +0 -390
  115. package/dist/bundled/v3/components/or-inputs/index.d.ts +0 -5
  116. package/dist/esm/v2/components/or-inputs/index.d.ts +0 -5
  117. package/dist/esm/v3/OrSearch-7cb2c91c.js +0 -1075
  118. package/dist/esm/v3/components/or-inputs/index.d.ts +0 -5
  119. package/src/components/or-inputs/index.ts +0 -5
  120. /package/dist/bundled/v2/{OrInput-08f2f666.js → OrInput-df1a14fa.js} +0 -0
  121. /package/dist/bundled/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  122. /package/dist/bundled/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  123. /package/dist/bundled/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  124. /package/dist/bundled/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  125. /package/dist/bundled/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  126. /package/dist/bundled/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  127. /package/dist/bundled/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  128. /package/dist/bundled/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  129. /package/dist/bundled/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  130. /package/dist/bundled/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  131. /package/dist/esm/v2/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  132. /package/dist/esm/v2/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  133. /package/dist/esm/v2/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  134. /package/dist/esm/v2/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  135. /package/dist/esm/v2/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  136. /package/dist/esm/v3/components/{or-inputs → or-input}/OrInput.vue.d.ts +0 -0
  137. /package/dist/esm/v3/components/{or-inputs → or-number-input}/OrNumberInput.vue.d.ts +0 -0
  138. /package/dist/esm/v3/components/{or-inputs → or-password}/OrPassword.vue.d.ts +0 -0
  139. /package/dist/esm/v3/components/{or-inputs → or-search}/OrSearch.vue.d.ts +0 -0
  140. /package/dist/esm/v3/components/{or-inputs → or-textarea}/OrTextarea.vue.d.ts +0 -0
  141. /package/src/components/{or-inputs → or-input}/OrInput.stories.ts +0 -0
  142. /package/src/components/{or-inputs → or-input}/OrInput.vue +0 -0
  143. /package/src/components/{or-inputs → or-input}/or-textbox-migration.stories.mdx +0 -0
  144. /package/src/components/{or-inputs → or-input}/styles.scss +0 -0
  145. /package/src/components/{or-inputs → or-number-input}/OrNumberInput.stories.ts +0 -0
  146. /package/src/components/{or-inputs → or-password}/OrPassword.stories.ts +0 -0
  147. /package/src/components/{or-inputs → or-search}/OrSearch.stories.ts +0 -0
  148. /package/src/components/{or-inputs → or-textarea}/OrTextarea.stories.ts +0 -0
@@ -0,0 +1,225 @@
1
+ import { defineComponent, ref } from 'vue-demi';
2
+ import { _ as __vue_component__$1 } from './OrInput-6e6cfd11.js';
3
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
4
+
5
+ var script = defineComponent({
6
+ name: 'OrNumberInput',
7
+ components: {
8
+ OrInput: __vue_component__$1
9
+ },
10
+ model: {
11
+ prop: 'modelValue',
12
+ event: 'update:modelValue'
13
+ },
14
+ props: {
15
+ modelValue: {
16
+ type: Number,
17
+ default: undefined,
18
+ required: false
19
+ },
20
+ htmlId: {
21
+ type: String,
22
+ default: '',
23
+ required: false
24
+ },
25
+ placeholder: {
26
+ type: String,
27
+ default: '',
28
+ required: false
29
+ },
30
+ label: {
31
+ type: String,
32
+ default: '',
33
+ required: false
34
+ },
35
+ error: {
36
+ type: String,
37
+ default: '',
38
+ required: false
39
+ },
40
+ hint: {
41
+ type: String,
42
+ default: '',
43
+ required: false
44
+ },
45
+ minValue: {
46
+ type: Number,
47
+ default: undefined,
48
+ required: false
49
+ },
50
+ maxValue: {
51
+ type: Number,
52
+ default: undefined,
53
+ required: false
54
+ },
55
+ stepValue: {
56
+ type: Number,
57
+ default: undefined,
58
+ required: false
59
+ },
60
+ isSmall: Boolean,
61
+ isRequired: Boolean,
62
+ isDisabled: Boolean,
63
+ isReadonly: Boolean,
64
+ isInvalid: Boolean
65
+ },
66
+ emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
67
+ setup(props, {
68
+ emit
69
+ }) {
70
+ const inputRef = ref();
71
+ if (props.modelValue) {
72
+ if (props.minValue !== undefined && props.modelValue < props.minValue) {
73
+ emit('update:modelValue', props.minValue);
74
+ } else if (props.maxValue !== undefined && props.modelValue > props.maxValue) {
75
+ emit('update:modelValue', props.maxValue);
76
+ }
77
+ }
78
+ return {
79
+ inputRef
80
+ };
81
+ },
82
+ computed: {
83
+ htmlInputAttrs() {
84
+ return {
85
+ min: this.minValue,
86
+ max: this.maxValue,
87
+ step: this.stepValue
88
+ };
89
+ },
90
+ localValue: {
91
+ get() {
92
+ var _a;
93
+ return ((_a = this.modelValue) !== null && _a !== void 0 ? _a : '') + '';
94
+ },
95
+ set(val) {
96
+ if (val === undefined || val === '') {
97
+ this.$emit('update:modelValue', undefined);
98
+ return;
99
+ }
100
+ const numVal = +val;
101
+ if (this.minValue !== undefined && numVal < this.minValue) {
102
+ this.$emit('update:modelValue', this.minValue);
103
+ } else if (this.maxValue !== undefined && numVal > this.maxValue) {
104
+ this.$emit('update:modelValue', this.maxValue);
105
+ } else {
106
+ this.$emit('update:modelValue', numVal);
107
+ }
108
+ }
109
+ }
110
+ }
111
+ });
112
+
113
+ /* script */
114
+ const __vue_script__ = script;
115
+
116
+ /* template */
117
+ var __vue_render__ = function () {
118
+ var _vm = this;
119
+ var _h = _vm.$createElement;
120
+ var _c = _vm._self._c || _h;
121
+ return _c('or-input', {
122
+ ref: "inputRef",
123
+ staticClass: "or-password",
124
+ attrs: {
125
+ "html-id": _vm.htmlId,
126
+ "placeholder": _vm.placeholder,
127
+ "html-type": "number",
128
+ "html-input-attrs": _vm.htmlInputAttrs,
129
+ "label": _vm.label,
130
+ "error": _vm.error,
131
+ "hint": _vm.hint,
132
+ "is-small": _vm.isSmall,
133
+ "is-required": _vm.isRequired,
134
+ "is-disabled": _vm.isDisabled,
135
+ "is-readonly": _vm.isReadonly,
136
+ "is-invalid": _vm.isInvalid
137
+ },
138
+ on: {
139
+ "focus": function ($event) {
140
+ return _vm.$emit('focus', $event);
141
+ },
142
+ "blur": function ($event) {
143
+ return _vm.$emit('blur', $event);
144
+ },
145
+ "input": function ($event) {
146
+ return _vm.$emit('input', $event);
147
+ },
148
+ "keypress": function ($event) {
149
+ return _vm.$emit('keypress', $event);
150
+ },
151
+ "keyup": function ($event) {
152
+ return _vm.$emit('keyup', $event);
153
+ },
154
+ "keydown": function ($event) {
155
+ return _vm.$emit('keydown', $event);
156
+ }
157
+ },
158
+ scopedSlots: _vm._u([_vm.$slots.prepend ? {
159
+ key: "prepend",
160
+ fn: function () {
161
+ return [_vm._t("prepend")];
162
+ },
163
+ proxy: true
164
+ } : null, _vm.$slots['label-default'] ? {
165
+ key: "label-default",
166
+ fn: function () {
167
+ return [_vm._t("label-default")];
168
+ },
169
+ proxy: true
170
+ } : null, _vm.$slots['label-append'] ? {
171
+ key: "label-append",
172
+ fn: function () {
173
+ return [_vm._t("label-append")];
174
+ },
175
+ proxy: true
176
+ } : null, _vm.$slots['wrapper-end'] ? {
177
+ key: "wrapper-end",
178
+ fn: function () {
179
+ return [_vm._t("wrapper-end")];
180
+ },
181
+ proxy: true
182
+ } : null, _vm.$slots['input-end'] ? {
183
+ key: "input-end",
184
+ fn: function () {
185
+ return [_vm._t("input-end")];
186
+ },
187
+ proxy: true
188
+ } : null, _vm.$slots.append ? {
189
+ key: "append",
190
+ fn: function () {
191
+ return [_vm._t("append")];
192
+ },
193
+ proxy: true
194
+ } : null], null, true),
195
+ model: {
196
+ value: _vm.localValue,
197
+ callback: function ($$v) {
198
+ _vm.localValue = $$v;
199
+ },
200
+ expression: "localValue"
201
+ }
202
+ });
203
+ };
204
+ var __vue_staticRenderFns__ = [];
205
+
206
+ /* style */
207
+ const __vue_inject_styles__ = undefined;
208
+ /* scoped */
209
+ const __vue_scope_id__ = undefined;
210
+ /* module identifier */
211
+ const __vue_module_identifier__ = undefined;
212
+ /* functional template */
213
+ const __vue_is_functional_template__ = false;
214
+ /* style inject */
215
+
216
+ /* style inject SSR */
217
+
218
+ /* style inject shadow dom */
219
+
220
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
221
+ render: __vue_render__,
222
+ staticRenderFns: __vue_staticRenderFns__
223
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
224
+
225
+ export { __vue_component__ as _ };
@@ -0,0 +1,225 @@
1
+ import { defineComponent, ref } from 'vue-demi';
2
+ import { useVModel } from '@vueuse/core';
3
+ import { _ as __vue_component__$1 } from './OrInput-6e6cfd11.js';
4
+ import { u as useToggle } from './useToggle-29e4d7c7.js';
5
+ import { b as BUTTON_SIZE } from './OrIconButton.vue_rollup-plugin-vue_script-9fb7b7ab.js';
6
+ import { c as createInjector } from './browser-82dea9ed.js';
7
+ import { _ as __vue_component__$2 } from './OrIconButton-014e86a7.js';
8
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
9
+
10
+ var script = defineComponent({
11
+ name: 'OrPassword',
12
+ components: {
13
+ OrInput: __vue_component__$1,
14
+ OrIconButton: __vue_component__$2
15
+ },
16
+ model: {
17
+ prop: 'modelValue',
18
+ event: 'update:modelValue'
19
+ },
20
+ props: {
21
+ modelValue: {
22
+ type: String,
23
+ default: '',
24
+ required: false
25
+ },
26
+ htmlId: {
27
+ type: String,
28
+ default: '',
29
+ required: false
30
+ },
31
+ placeholder: {
32
+ type: String,
33
+ default: '',
34
+ required: false
35
+ },
36
+ label: {
37
+ type: String,
38
+ default: '',
39
+ required: false
40
+ },
41
+ error: {
42
+ type: String,
43
+ default: '',
44
+ required: false
45
+ },
46
+ hint: {
47
+ type: String,
48
+ default: '',
49
+ required: false
50
+ },
51
+ maxLength: {
52
+ type: Number,
53
+ default: undefined,
54
+ required: false
55
+ },
56
+ isSmall: Boolean,
57
+ isRequired: Boolean,
58
+ isDisabled: Boolean,
59
+ isReadonly: Boolean,
60
+ isInvalid: Boolean
61
+ },
62
+ emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
63
+ setup(props, {
64
+ emit
65
+ }) {
66
+ const inputRef = ref();
67
+ const localValue = useVModel(props, 'modelValue', emit);
68
+ const {
69
+ isActiveToggle,
70
+ toggle
71
+ } = useToggle();
72
+ return {
73
+ inputRef,
74
+ localValue,
75
+ isActiveToggle,
76
+ toggle
77
+ };
78
+ },
79
+ computed: {
80
+ currentButtonIcon() {
81
+ return this.isActiveToggle ? 'visibility' : 'visibility_off';
82
+ },
83
+ type() {
84
+ return this.isActiveToggle ? 'text' : 'password';
85
+ },
86
+ size() {
87
+ return this.isSmall ? BUTTON_SIZE.SMALL : BUTTON_SIZE.DEFAULT;
88
+ }
89
+ },
90
+ methods: {
91
+ onClick() {
92
+ var _a;
93
+ this.toggle();
94
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
95
+ }
96
+ }
97
+ });
98
+
99
+ /* script */
100
+ const __vue_script__ = script;
101
+
102
+ /* template */
103
+ var __vue_render__ = function () {
104
+ var _vm = this;
105
+ var _h = _vm.$createElement;
106
+ var _c = _vm._self._c || _h;
107
+ return _c('or-input', {
108
+ ref: "inputRef",
109
+ staticClass: "or-password",
110
+ attrs: {
111
+ "html-id": _vm.htmlId,
112
+ "placeholder": _vm.placeholder,
113
+ "html-type": _vm.type,
114
+ "label": _vm.label,
115
+ "error": _vm.error,
116
+ "hint": _vm.hint,
117
+ "max-length": _vm.maxLength,
118
+ "is-small": _vm.isSmall,
119
+ "is-required": _vm.isRequired,
120
+ "is-disabled": _vm.isDisabled,
121
+ "is-readonly": _vm.isReadonly,
122
+ "is-invalid": _vm.isInvalid
123
+ },
124
+ on: {
125
+ "focus": function ($event) {
126
+ return _vm.$emit('focus', $event);
127
+ },
128
+ "blur": function ($event) {
129
+ return _vm.$emit('blur', $event);
130
+ },
131
+ "input": function ($event) {
132
+ return _vm.$emit('input', $event);
133
+ },
134
+ "keypress": function ($event) {
135
+ return _vm.$emit('keypress', $event);
136
+ },
137
+ "keyup": function ($event) {
138
+ return _vm.$emit('keyup', $event);
139
+ },
140
+ "keydown": function ($event) {
141
+ return _vm.$emit('keydown', $event);
142
+ }
143
+ },
144
+ scopedSlots: _vm._u([_vm.$slots.prepend ? {
145
+ key: "prepend",
146
+ fn: function () {
147
+ return [_vm._t("prepend")];
148
+ },
149
+ proxy: true
150
+ } : null, _vm.$slots['label-default'] ? {
151
+ key: "label-default",
152
+ fn: function () {
153
+ return [_vm._t("label-default")];
154
+ },
155
+ proxy: true
156
+ } : null, _vm.$slots['label-append'] ? {
157
+ key: "label-append",
158
+ fn: function () {
159
+ return [_vm._t("label-append")];
160
+ },
161
+ proxy: true
162
+ } : null, {
163
+ key: "wrapper-end",
164
+ fn: function () {
165
+ return [_c('or-icon-button', {
166
+ attrs: {
167
+ "icon": _vm.currentButtonIcon,
168
+ "icon-color": "neutral-4",
169
+ "size": _vm.size
170
+ },
171
+ on: {
172
+ "click": _vm.onClick
173
+ }
174
+ })];
175
+ },
176
+ proxy: true
177
+ }, _vm.$slots['input-end'] ? {
178
+ key: "input-end",
179
+ fn: function () {
180
+ return [_vm._t("input-end")];
181
+ },
182
+ proxy: true
183
+ } : null, _vm.$slots.append ? {
184
+ key: "append",
185
+ fn: function () {
186
+ return [_vm._t("append")];
187
+ },
188
+ proxy: true
189
+ } : null], null, true),
190
+ model: {
191
+ value: _vm.localValue,
192
+ callback: function ($$v) {
193
+ _vm.localValue = $$v;
194
+ },
195
+ expression: "localValue"
196
+ }
197
+ });
198
+ };
199
+ var __vue_staticRenderFns__ = [];
200
+
201
+ /* style */
202
+ const __vue_inject_styles__ = function (inject) {
203
+ if (!inject) return;
204
+ inject("data-v-c5297b48_0", {
205
+ source: "@keyframes spinAround-data-v-c5297b48{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-c5297b48{from{opacity:1}to{opacity:0}}.or-password .or-icon-button-root[data-v-c5297b48]{position:absolute;top:50%;right:0;z-index:1;transform:translate(-.625rem,-50%)}.or-password[data-v-c5297b48] .or-textbox--input{padding-right:calc(.625rem + 1.625rem)}.or-password.is-small[data-v-c5297b48] .or-textbox--input{padding-right:calc(.625rem + 1.5rem)}",
206
+ map: undefined,
207
+ media: undefined
208
+ });
209
+ };
210
+ /* scoped */
211
+ const __vue_scope_id__ = "data-v-c5297b48";
212
+ /* module identifier */
213
+ const __vue_module_identifier__ = undefined;
214
+ /* functional template */
215
+ const __vue_is_functional_template__ = false;
216
+ /* style inject SSR */
217
+
218
+ /* style inject shadow dom */
219
+
220
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
221
+ render: __vue_render__,
222
+ staticRenderFns: __vue_staticRenderFns__
223
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, createInjector, undefined, undefined);
224
+
225
+ export { __vue_component__ as _ };
@@ -1,6 +1,123 @@
1
- import { c as script } from './OrSearch.vue_rollup-plugin-vue_script-197d77fc.js';
2
- import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
1
+ import { defineComponent, ref } from 'vue-demi';
2
+ import { _ as __vue_component__$1 } from './OrInput-6e6cfd11.js';
3
+ import { debouncedWatch } from '@vueuse/core';
4
+ import { b as BUTTON_SIZE } from './OrIconButton.vue_rollup-plugin-vue_script-9fb7b7ab.js';
3
5
  import { c as createInjector } from './browser-82dea9ed.js';
6
+ import { _ as __vue_component__$2 } from './OrIconButton-014e86a7.js';
7
+ import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
8
+
9
+ var script = defineComponent({
10
+ name: 'OrSearch',
11
+ components: {
12
+ OrInput: __vue_component__$1,
13
+ OrIconButton: __vue_component__$2
14
+ },
15
+ model: {
16
+ prop: 'modelValue',
17
+ event: 'update:modelValue'
18
+ },
19
+ props: {
20
+ modelValue: {
21
+ type: String,
22
+ default: '',
23
+ required: false
24
+ },
25
+ htmlId: {
26
+ type: String,
27
+ default: '',
28
+ required: false
29
+ },
30
+ placeholder: {
31
+ type: String,
32
+ default: '',
33
+ required: false
34
+ },
35
+ label: {
36
+ type: String,
37
+ default: '',
38
+ required: false
39
+ },
40
+ error: {
41
+ type: String,
42
+ default: '',
43
+ required: false
44
+ },
45
+ hint: {
46
+ type: String,
47
+ default: '',
48
+ required: false
49
+ },
50
+ debounce: {
51
+ type: Number,
52
+ default: 500,
53
+ required: false
54
+ },
55
+ isUsingTrim: {
56
+ type: Boolean,
57
+ default: true,
58
+ required: false
59
+ },
60
+ maxLength: {
61
+ type: Number,
62
+ default: undefined,
63
+ required: false
64
+ },
65
+ isSmall: Boolean,
66
+ isRequired: Boolean,
67
+ isDisabled: Boolean,
68
+ isReadonly: Boolean,
69
+ isInvalid: Boolean
70
+ },
71
+ emits: ['focus', 'blur', 'update:modelValue', 'input', 'search', 'clear', 'keypress', 'keyup', 'keydown'],
72
+ setup(props, {
73
+ emit
74
+ }) {
75
+ var _a;
76
+ const inputRef = ref();
77
+ const localValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
78
+ debouncedWatch(localValue, () => {
79
+ emit('search', props.isUsingTrim ? localValue.value.trim() : localValue.value);
80
+ }, {
81
+ debounce: +props.debounce
82
+ });
83
+ return {
84
+ inputRef,
85
+ localValue
86
+ };
87
+ },
88
+ computed: {
89
+ hasValue() {
90
+ var _a;
91
+ return !!((_a = this.localValue) === null || _a === void 0 ? void 0 : _a.length);
92
+ },
93
+ currentButtonIcon() {
94
+ return this.hasValue ? 'close' : 'search';
95
+ },
96
+ size() {
97
+ return this.isSmall ? BUTTON_SIZE.SMALL : BUTTON_SIZE.DEFAULT;
98
+ }
99
+ },
100
+ watch: {
101
+ modelValue(val) {
102
+ if (this.localValue !== val) this.localValue = val;
103
+ }
104
+ },
105
+ methods: {
106
+ onClick() {
107
+ var _a;
108
+ if (this.hasValue) {
109
+ this.localValue = '';
110
+ this.$emit('update:modelValue', '');
111
+ this.$emit('clear');
112
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
113
+ }
114
+ },
115
+ onModelValueUpdate(value) {
116
+ this.localValue = value;
117
+ this.$emit('update:modelValue', value);
118
+ }
119
+ }
120
+ });
4
121
 
5
122
  /* script */
6
123
  const __vue_script__ = script;
@@ -105,14 +222,14 @@ var __vue_staticRenderFns__ = [];
105
222
  /* style */
106
223
  const __vue_inject_styles__ = function (inject) {
107
224
  if (!inject) return;
108
- inject("data-v-073ad33e_0", {
109
- source: "@keyframes spinAround-data-v-073ad33e{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-073ad33e{from{opacity:1}to{opacity:0}}.or-search .or-icon-button-root[data-v-073ad33e]{position:absolute;top:50%;right:0;z-index:1;transform:translate(-.625rem,-50%)}.or-search[data-v-073ad33e] .or-textbox--input{padding-right:calc(.625rem + 1.625rem)}.or-search.is-small[data-v-073ad33e] .or-textbox--input{padding-right:calc(.625rem + 1.5rem)}",
225
+ inject("data-v-81c3bf2c_0", {
226
+ source: "@keyframes spinAround-data-v-81c3bf2c{from{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes fade-data-v-81c3bf2c{from{opacity:1}to{opacity:0}}.or-search .or-icon-button-root[data-v-81c3bf2c]{position:absolute;top:50%;right:0;z-index:1;transform:translate(-.625rem,-50%)}.or-search[data-v-81c3bf2c] .or-textbox--input{padding-right:calc(.625rem + 1.625rem)}.or-search.is-small[data-v-81c3bf2c] .or-textbox--input{padding-right:calc(.625rem + 1.5rem)}",
110
227
  map: undefined,
111
228
  media: undefined
112
229
  });
113
230
  };
114
231
  /* scoped */
115
- const __vue_scope_id__ = "data-v-073ad33e";
232
+ const __vue_scope_id__ = "data-v-81c3bf2c";
116
233
  /* module identifier */
117
234
  const __vue_module_identifier__ = undefined;
118
235
  /* functional template */