@onereach/ui-components 2.71.2-beta.2238.0 → 2.71.2-beta.2240.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.
- package/dist/bundled/v2/{OrCardCollection-166cfcc6.js → OrCardCollection-89428bbf.js} +5 -5
- package/dist/bundled/v2/{OrCardCollection-091e2193.js → OrCardCollection-c1ccde63.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-55b89b17.js → OrConfirm-56d01cff.js} +4 -4
- package/dist/bundled/v2/{OrConfirm-bb2df177.js → OrConfirm-cc8b767f.js} +1 -1
- package/dist/bundled/v2/{OrInput-5404a234.js → OrInput-c539e47c.js} +23 -6
- package/dist/bundled/v2/{OrListOfInputs-ab7f9d97.js → OrListOfInputs-8f076650.js} +4 -4
- package/dist/bundled/v2/{OrTextarea-71ff236d.js → OrPassword-7da938aa.js} +449 -7
- package/dist/bundled/v2/{OrSearch-d1169241.js → OrSearch-d7326373.js} +1 -1
- package/dist/bundled/v2/{OrSearch-832d7978.js → OrSearch-f7cfa52f.js} +4 -4
- package/dist/bundled/v2/{OrSelect-5634790b.js → OrSelect-8802f330.js} +1 -1
- package/dist/bundled/v2/components/index.d.ts +1 -5
- package/dist/bundled/v2/components/index.js +13 -15
- package/dist/bundled/v2/components/or-card-collection/index.js +4 -4
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-confirm/index.js +2 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/bundled/v2/components/or-input-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-inputs/index.d.ts +5 -0
- package/dist/bundled/v2/components/{or-password → or-inputs}/index.js +4 -3
- package/dist/bundled/v2/components/or-list-of-inputs/index.js +2 -2
- package/dist/bundled/v2/components/or-search-v3/index.js +3 -2
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -2
- package/dist/bundled/v2/index.js +11 -13
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-cd84f344.js → OrCardCollection.vue_vue_type_script_lang-d8124dda.js} +4 -4
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-60403ae6.js → OrCardCollection.vue_vue_type_script_lang-f9897e01.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-41b4d791.js → OrConfirm.vue_vue_type_script_lang-0f16fc67.js} +1 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9231d51e.js → OrConfirm.vue_vue_type_script_lang-e9ba9909.js} +2 -2
- package/dist/bundled/v3/{OrInput-2a7c6b57.js → OrInput-41f8351a.js} +13 -4
- package/dist/bundled/v3/{OrInput-704e72ba.js → OrInput-7d4b571a.js} +193 -5
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-509de504.js → OrInput.vue_vue_type_script_lang-b88324b6.js} +13 -1
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-6c5cf7a5.js → OrListOfInputs.vue_vue_type_script_lang-62dbf1e7.js} +1 -2
- package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-13bc5b00.js +390 -0
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-5356fa79.js → OrSearch.vue_vue_type_script_lang-16fbccc0.js} +1 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ab2ef22c.js → OrSearch.vue_vue_type_script_lang-56eb4e93.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-54f683a2.js → OrSelect.vue_vue_type_script_lang-ee433d47.js} +2 -2
- package/dist/bundled/v3/components/index.d.ts +1 -5
- package/dist/bundled/v3/components/index.js +14 -17
- package/dist/bundled/v3/components/or-card-collection/index.js +4 -5
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-confirm/index.js +2 -3
- package/dist/bundled/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-inputs/index.d.ts +5 -0
- package/dist/bundled/v3/components/{or-search → or-inputs}/index.js +5 -4
- package/dist/bundled/v3/components/or-list-of-inputs/index.js +2 -3
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -3
- package/dist/bundled/v3/components/or-select-v3/index.js +5 -3
- package/dist/bundled/v3/index.js +659 -664
- package/dist/esm/v2/{OrCardCollection-19582949.js → OrCardCollection-f6b07557.js} +7 -6
- package/dist/esm/v2/{OrCardCollection-bbdb6159.js → OrCardCollection-ff1e9819.js} +1 -1
- package/dist/esm/v2/{OrConfirm-ede619eb.js → OrConfirm-d7112dd3.js} +4 -4
- package/dist/esm/v2/{OrConfirm-cfaf4266.js → OrConfirm-ec81498e.js} +1 -1
- package/dist/esm/v2/{OrInput-e8fe9102.js → OrInput-b029d058.js} +23 -6
- package/dist/esm/v2/{OrListOfInputs-4298fa2c.js → OrListOfInputs-50aa1ef1.js} +5 -5
- package/dist/esm/v2/{OrTextarea-91a95068.js → OrPassword-1fa97156.js} +245 -187
- package/dist/esm/v2/{OrSearch-b4f4d59b.js → OrSearch-0589d17d.js} +5 -122
- package/dist/esm/v2/{OrSearch-4b774707.js → OrSearch-1c934f72.js} +1 -1
- package/dist/esm/v2/{OrInput-6e6cfd11.js → OrSearch.vue_rollup-plugin-vue_script-197d77fc.js} +492 -4
- package/dist/esm/v2/{OrSelect-d7016575.js → OrSelect-cfcb233a.js} +1 -1
- package/dist/esm/v2/components/index.d.ts +1 -5
- package/dist/esm/v2/components/index.js +13 -15
- package/dist/esm/v2/components/or-card-collection/index.js +4 -3
- package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v2/components/or-confirm/index.js +3 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/esm/v2/components/or-input-v3/index.js +3 -2
- package/dist/esm/v2/components/or-inputs/index.d.ts +5 -0
- package/dist/esm/v2/components/{or-password → or-inputs}/index.js +6 -5
- package/dist/esm/v2/components/or-list-of-inputs/index.js +4 -2
- package/dist/esm/v2/components/or-search-v3/index.js +4 -3
- package/dist/esm/v2/components/or-select-v3/index.js +4 -3
- package/dist/esm/v2/index.js +11 -13
- package/dist/esm/v3/{OrCardCollection-47f61c40.js → OrCardCollection-5ecdcbaf.js} +1 -1
- package/dist/esm/v3/{OrCardCollection-1e44c758.js → OrCardCollection-a5e326ef.js} +2 -2
- package/dist/esm/v3/{OrConfirm-e7cbf54c.js → OrConfirm-beeb74d6.js} +1 -1
- package/dist/esm/v3/{OrConfirm-c11ee2ec.js → OrConfirm-f39bd784.js} +1 -1
- package/dist/esm/v3/{OrInput-6fb81556.js → OrInput-8a4573cd.js} +24 -4
- package/dist/esm/v3/{OrListOfInputs-508e056f.js → OrListOfInputs-7a67440f.js} +1 -1
- package/dist/esm/v3/{OrSearch-e15955a7.js → OrSearch-10d09806.js} +1 -1
- package/dist/esm/v3/OrSearch-7cb2c91c.js +1075 -0
- package/dist/esm/v3/{OrSelect-027b5e8f.js → OrSelect-1e4c6062.js} +1 -1
- package/dist/esm/v3/components/index.d.ts +1 -5
- package/dist/esm/v3/components/index.js +11 -15
- package/dist/esm/v3/components/or-card-collection/index.js +3 -3
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v3/components/or-confirm/index.js +3 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +13 -0
- package/dist/esm/v3/components/or-input-v3/index.js +3 -2
- package/dist/esm/v3/components/or-inputs/index.d.ts +5 -0
- package/dist/esm/v3/components/{or-password → or-inputs}/index.js +2 -3
- package/dist/esm/v3/components/or-list-of-inputs/index.js +4 -2
- package/dist/esm/v3/components/or-search-v3/index.js +4 -3
- package/dist/esm/v3/components/or-select-v3/index.js +4 -3
- package/dist/esm/v3/index.js +9 -13
- package/package.json +1 -1
- package/src/components/index.ts +1 -5
- package/src/components/or-card-collection/OrCardCollection.vue +8 -8
- package/src/components/or-confirm/OrConfirm.vue +1 -1
- package/src/components/or-input-v3/OrInput.stories3.ts +4 -0
- package/src/components/or-input-v3/OrInput.vue +37 -17
- package/src/components/{or-number-input → or-inputs}/OrNumberInput.vue +1 -1
- package/src/components/{or-password → or-inputs}/OrPassword.vue +1 -1
- package/src/components/{or-search → or-inputs}/OrSearch.vue +1 -1
- package/src/components/{or-textarea → or-inputs}/OrTextarea.vue +6 -225
- package/src/components/or-inputs/index.ts +5 -0
- package/src/components/or-list/OrList.stories.ts +1 -1
- package/src/components/or-list-of-inputs/OrListOfInputs.vue +1 -1
- package/src/components/or-modal/OrModal.stories.ts +1 -1
- package/dist/bundled/v2/OrNumberInput-face8ccc.js +0 -227
- package/dist/bundled/v2/OrPassword-a818e7b5.js +0 -227
- package/dist/bundled/v2/components/or-input/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-input/index.js +0 -13
- package/dist/bundled/v2/components/or-number-input/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-number-input/index.js +0 -14
- package/dist/bundled/v2/components/or-password/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-search/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-search/index.js +0 -25
- package/dist/bundled/v2/components/or-textarea/index.d.ts +0 -1
- package/dist/bundled/v2/components/or-textarea/index.js +0 -13
- package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-409235cc.js +0 -190
- package/dist/bundled/v3/OrNumberInput.vue_vue_type_script_lang-f061d829.js +0 -113
- package/dist/bundled/v3/OrPassword.vue_vue_type_script_lang-b75f6543.js +0 -99
- package/dist/bundled/v3/OrTextarea.vue_vue_type_script_lang-69ea22e9.js +0 -187
- package/dist/bundled/v3/components/or-input/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-input/index.js +0 -14
- package/dist/bundled/v3/components/or-number-input/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-number-input/index.js +0 -16
- package/dist/bundled/v3/components/or-password/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-password/index.js +0 -31
- package/dist/bundled/v3/components/or-search/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-textarea/index.d.ts +0 -1
- package/dist/bundled/v3/components/or-textarea/index.js +0 -14
- package/dist/esm/v2/OrNumberInput-b20d75d2.js +0 -225
- package/dist/esm/v2/OrPassword-e6d5e968.js +0 -225
- package/dist/esm/v2/components/or-input/index.d.ts +0 -1
- package/dist/esm/v2/components/or-input/index.js +0 -11
- package/dist/esm/v2/components/or-number-input/index.d.ts +0 -1
- package/dist/esm/v2/components/or-number-input/index.js +0 -12
- package/dist/esm/v2/components/or-password/index.d.ts +0 -1
- package/dist/esm/v2/components/or-search/index.d.ts +0 -1
- package/dist/esm/v2/components/or-search/index.js +0 -23
- package/dist/esm/v2/components/or-textarea/index.d.ts +0 -1
- package/dist/esm/v2/components/or-textarea/index.js +0 -11
- package/dist/esm/v3/OrInput-81125804.js +0 -295
- package/dist/esm/v3/OrNumberInput-b32b5ce3.js +0 -170
- package/dist/esm/v3/OrPassword-b0cbb578.js +0 -162
- package/dist/esm/v3/OrSearch-11fdf667.js +0 -188
- package/dist/esm/v3/OrTextarea-1f5c3be1.js +0 -290
- package/dist/esm/v3/components/or-input/index.d.ts +0 -1
- package/dist/esm/v3/components/or-input/index.js +0 -11
- package/dist/esm/v3/components/or-number-input/index.d.ts +0 -1
- package/dist/esm/v3/components/or-number-input/index.js +0 -12
- package/dist/esm/v3/components/or-password/index.d.ts +0 -1
- package/dist/esm/v3/components/or-search/index.d.ts +0 -1
- package/dist/esm/v3/components/or-search/index.js +0 -20
- package/dist/esm/v3/components/or-textarea/index.d.ts +0 -1
- package/dist/esm/v3/components/or-textarea/index.js +0 -11
- package/src/components/or-input/index.ts +0 -1
- package/src/components/or-number-input/index.ts +0 -1
- package/src/components/or-password/index.ts +0 -1
- package/src/components/or-search/index.ts +0 -1
- package/src/components/or-textarea/index.ts +0 -1
- /package/dist/bundled/v2/{OrInput-df1a14fa.js → OrInput-08f2f666.js} +0 -0
- /package/dist/bundled/v2/components/{or-input → or-inputs}/OrInput.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-number-input → or-inputs}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-password → or-inputs}/OrPassword.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-search → or-inputs}/OrSearch.vue.d.ts +0 -0
- /package/dist/bundled/v2/components/{or-textarea → or-inputs}/OrTextarea.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-input → or-inputs}/OrInput.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-number-input → or-inputs}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-password → or-inputs}/OrPassword.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-search → or-inputs}/OrSearch.vue.d.ts +0 -0
- /package/dist/bundled/v3/components/{or-textarea → or-inputs}/OrTextarea.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-input → or-inputs}/OrInput.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-number-input → or-inputs}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-password → or-inputs}/OrPassword.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-search → or-inputs}/OrSearch.vue.d.ts +0 -0
- /package/dist/esm/v2/components/{or-textarea → or-inputs}/OrTextarea.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-input → or-inputs}/OrInput.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-number-input → or-inputs}/OrNumberInput.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-password → or-inputs}/OrPassword.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-search → or-inputs}/OrSearch.vue.d.ts +0 -0
- /package/dist/esm/v3/components/{or-textarea → or-inputs}/OrTextarea.vue.d.ts +0 -0
- /package/src/components/{or-input → or-inputs}/OrInput.stories.ts +0 -0
- /package/src/components/{or-input → or-inputs}/OrInput.vue +0 -0
- /package/src/components/{or-number-input → or-inputs}/OrNumberInput.stories.ts +0 -0
- /package/src/components/{or-password → or-inputs}/OrPassword.stories.ts +0 -0
- /package/src/components/{or-search → or-inputs}/OrSearch.stories.ts +0 -0
- /package/src/components/{or-textarea → or-inputs}/OrTextarea.stories.ts +0 -0
- /package/src/components/{or-input → or-inputs}/or-textbox-migration.stories.mdx +0 -0
- /package/src/components/{or-input → or-inputs}/styles.scss +0 -0
|
@@ -42,30 +42,40 @@
|
|
|
42
42
|
>
|
|
43
43
|
|
|
44
44
|
<div :class="['layout-row']">
|
|
45
|
-
<template v-if="
|
|
46
|
-
<
|
|
47
|
-
:
|
|
48
|
-
:color="'
|
|
49
|
-
:
|
|
50
|
-
@click.stop="disclosed = !disclosed"
|
|
45
|
+
<template v-if="loading">
|
|
46
|
+
<OrLoader
|
|
47
|
+
:variant="'circular'"
|
|
48
|
+
:color="'primary'"
|
|
49
|
+
:size="isMobile ? 'm' : 's'"
|
|
51
50
|
/>
|
|
52
51
|
</template>
|
|
53
52
|
|
|
54
|
-
<template v-
|
|
55
|
-
<template v-if="
|
|
53
|
+
<template v-else>
|
|
54
|
+
<template v-if="type === 'password'">
|
|
56
55
|
<OrIconButton
|
|
57
|
-
:icon="'
|
|
56
|
+
:icon="{ icon: disclosed ? 'visibility_off' : 'visibility', variant: 'filled' }"
|
|
58
57
|
:color="'inherit'"
|
|
59
|
-
:disabled="
|
|
60
|
-
@click.stop="
|
|
58
|
+
:disabled="disabled"
|
|
59
|
+
@click.stop="disclosed = !disclosed"
|
|
61
60
|
/>
|
|
62
61
|
</template>
|
|
63
62
|
|
|
64
|
-
<template v-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
<template v-if="type === 'search'">
|
|
64
|
+
<template v-if="modelValue">
|
|
65
|
+
<OrIconButton
|
|
66
|
+
:icon="'close'"
|
|
67
|
+
:color="'inherit'"
|
|
68
|
+
:disabled="readonly || disabled"
|
|
69
|
+
@click.stop="$emit('update:modelValue', '')"
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<template v-else>
|
|
74
|
+
<OrIcon
|
|
75
|
+
:icon="'search'"
|
|
76
|
+
:variant="'outlined'"
|
|
77
|
+
/>
|
|
78
|
+
</template>
|
|
69
79
|
</template>
|
|
70
80
|
</template>
|
|
71
81
|
</div>
|
|
@@ -103,13 +113,14 @@
|
|
|
103
113
|
|
|
104
114
|
<script lang="ts">
|
|
105
115
|
import { computed, defineComponent, PropType, reactive, ref } from 'vue-demi';
|
|
106
|
-
import { useControlAttributes, useIdAttribute, useValidationAttributes } from '../../hooks';
|
|
116
|
+
import { useControlAttributes, useIdAttribute, useResponsive, useValidationAttributes } from '../../hooks';
|
|
107
117
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
108
118
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
109
119
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
110
120
|
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
111
121
|
import { OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
|
|
112
122
|
import { OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
123
|
+
import { OrLoaderV3 as OrLoader } from '../or-loader-v3';
|
|
113
124
|
import { InputSize, InputType } from './props';
|
|
114
125
|
import { InputControl, InputRoot } from './styles';
|
|
115
126
|
|
|
@@ -123,6 +134,7 @@ export default defineComponent({
|
|
|
123
134
|
OrIconButton,
|
|
124
135
|
OrInputBox,
|
|
125
136
|
OrLabel,
|
|
137
|
+
OrLoader,
|
|
126
138
|
},
|
|
127
139
|
|
|
128
140
|
model: {
|
|
@@ -166,6 +178,11 @@ export default defineComponent({
|
|
|
166
178
|
default: undefined,
|
|
167
179
|
},
|
|
168
180
|
|
|
181
|
+
loading: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: false,
|
|
184
|
+
},
|
|
185
|
+
|
|
169
186
|
required: {
|
|
170
187
|
type: Boolean,
|
|
171
188
|
default: false,
|
|
@@ -240,6 +257,8 @@ export default defineComponent({
|
|
|
240
257
|
|
|
241
258
|
const disclosed = ref(false);
|
|
242
259
|
|
|
260
|
+
const { isMobile } = useResponsive();
|
|
261
|
+
|
|
243
262
|
// Methods
|
|
244
263
|
function focus(): void {
|
|
245
264
|
control.value?.focus();
|
|
@@ -260,6 +279,7 @@ export default defineComponent({
|
|
|
260
279
|
maxLength,
|
|
261
280
|
invalid,
|
|
262
281
|
disclosed,
|
|
282
|
+
isMobile,
|
|
263
283
|
focus,
|
|
264
284
|
blur,
|
|
265
285
|
};
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
<script lang="ts">
|
|
66
66
|
import { defineComponent, ref } from 'vue-demi';
|
|
67
|
+
import OrInput from './OrInput.vue';
|
|
67
68
|
import { useVModel } from '@vueuse/core';
|
|
68
|
-
import { OrInput } from '../or-input';
|
|
69
69
|
import { useToggle } from '../../hooks';
|
|
70
70
|
import { BUTTON_SIZE, OrIconButton } from '../or-button-v2';
|
|
71
71
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
<script lang="ts">
|
|
68
68
|
import { defineComponent, ref } from 'vue-demi';
|
|
69
|
-
import
|
|
69
|
+
import OrInput from './OrInput.vue';
|
|
70
70
|
import { debouncedWatch } from '@vueuse/core';
|
|
71
71
|
import { BUTTON_SIZE, OrIconButton } from '../or-button-v2';
|
|
72
72
|
|
|
@@ -114,7 +114,11 @@
|
|
|
114
114
|
</template>
|
|
115
115
|
|
|
116
116
|
<script lang="ts">
|
|
117
|
-
import {
|
|
117
|
+
import {
|
|
118
|
+
defineComponent,
|
|
119
|
+
ref,
|
|
120
|
+
getCurrentInstance,
|
|
121
|
+
} from 'vue-demi';
|
|
118
122
|
import { pxToRem } from '../../utils/functions/px-to-rem';
|
|
119
123
|
import {
|
|
120
124
|
cancelAF,
|
|
@@ -315,228 +319,5 @@ export default defineComponent({
|
|
|
315
319
|
</script>
|
|
316
320
|
|
|
317
321
|
<style lang="scss" scoped>
|
|
318
|
-
@
|
|
319
|
-
|
|
320
|
-
.or-textbox {
|
|
321
|
-
display: flex;
|
|
322
|
-
align-items: flex-start;
|
|
323
|
-
justify-content: flex-start;
|
|
324
|
-
width: 100%;
|
|
325
|
-
|
|
326
|
-
&.is-show-info.has-label {
|
|
327
|
-
align-items: center;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
&.has-label {
|
|
331
|
-
align-items: flex-end;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.or-label {
|
|
335
|
-
margin-bottom: $s-1;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
&--append,
|
|
339
|
-
&--prepend {
|
|
340
|
-
position: relative;
|
|
341
|
-
display: flex;
|
|
342
|
-
align-items: center;
|
|
343
|
-
height: px-to-rem(36);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
&--append {
|
|
347
|
-
margin-left: px-to-rem(10);
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
&--prepend {
|
|
351
|
-
margin-right: px-to-rem(10);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
&--wrapper {
|
|
355
|
-
width: 100%;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
&--input {
|
|
359
|
-
width: 100%;
|
|
360
|
-
min-width: px-to-rem(114);
|
|
361
|
-
height: px-to-rem(36);
|
|
362
|
-
padding: px-to-rem(10);
|
|
363
|
-
font-family: inherit;
|
|
364
|
-
font-size: $fs-1;
|
|
365
|
-
background-color: $c-neutral-1;
|
|
366
|
-
border: 1px solid $c-neutral-2;
|
|
367
|
-
border-radius: $s-2;
|
|
368
|
-
outline: none;
|
|
369
|
-
|
|
370
|
-
@include transition(border-color, background-color, -webkit-box-shadow);
|
|
371
|
-
|
|
372
|
-
&-textarea {
|
|
373
|
-
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
|
374
|
-
@extend .or-textbox--input;
|
|
375
|
-
|
|
376
|
-
min-height: px-to-rem(79);
|
|
377
|
-
max-height: px-to-rem(142);
|
|
378
|
-
overflow-x: hidden;
|
|
379
|
-
overflow-y: auto;
|
|
380
|
-
resize: none;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
&-wrapper {
|
|
384
|
-
position: relative;
|
|
385
|
-
width: 100%;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
&::placeholder {
|
|
389
|
-
color: $c-neutral-4;
|
|
390
|
-
|
|
391
|
-
@include transition(opacity);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
&:-webkit-autofill {
|
|
395
|
-
-webkit-box-shadow: inset 0 0 0 50px $c-neutral-1;
|
|
396
|
-
|
|
397
|
-
@include focus {
|
|
398
|
-
-webkit-box-shadow: inset 0 0 0 50px $c-white;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
@include hover {
|
|
403
|
-
background-color: $c-white;
|
|
404
|
-
border-color: $c-neutral-2-darken-3;
|
|
405
|
-
-webkit-box-shadow: inset 0 0 0 50px $c-white;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
@include active {
|
|
409
|
-
&:not(:focus) {
|
|
410
|
-
border-color: $c-neutral-2-darken-5;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
@include focus {
|
|
415
|
-
background-color: $c-white;
|
|
416
|
-
border-color: $c-primary;
|
|
417
|
-
|
|
418
|
-
&::placeholder {
|
|
419
|
-
opacity: 0;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
@include disabled {
|
|
424
|
-
background-color: $c-neutral-2;
|
|
425
|
-
border-color: $c-neutral-2;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
@include has-error {
|
|
429
|
-
border-color: $c-error;
|
|
430
|
-
|
|
431
|
-
@include hover {
|
|
432
|
-
border-color: $c-error-darken-3;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
@include focus {
|
|
436
|
-
border-color: $c-error-darken-5;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
@include disabled {
|
|
440
|
-
border-color: $c-error-lighten-20;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
&--textarea {
|
|
446
|
-
/* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
|
|
447
|
-
@extend .or-textbox--input;
|
|
448
|
-
|
|
449
|
-
min-height: px-to-rem(79);
|
|
450
|
-
max-height: px-to-rem(142);
|
|
451
|
-
overflow-x: hidden;
|
|
452
|
-
overflow-y: auto;
|
|
453
|
-
resize: none;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
&--info {
|
|
457
|
-
width: 100%;
|
|
458
|
-
margin: 0;
|
|
459
|
-
|
|
460
|
-
@include transition(height, opacity);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
&--counter {
|
|
464
|
-
flex-shrink: 0;
|
|
465
|
-
margin-left: auto;
|
|
466
|
-
font-size: $fs-0;
|
|
467
|
-
line-height: px-to-rem(14);
|
|
468
|
-
color: $c-neutral-4;
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
&--hint,
|
|
472
|
-
&-error {
|
|
473
|
-
flex-shrink: 1;
|
|
474
|
-
|
|
475
|
-
@include transition(height, opacity);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
&.is-small {
|
|
479
|
-
.or-textbox {
|
|
480
|
-
&--input {
|
|
481
|
-
height: px-to-rem(30);
|
|
482
|
-
padding: px-to-rem(8) px-to-rem(10);
|
|
483
|
-
font-size: $fs-0;
|
|
484
|
-
|
|
485
|
-
&-toggle-btn {
|
|
486
|
-
.material-icons {
|
|
487
|
-
font-size: $fs-1;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
&.has-counter {
|
|
495
|
-
.or-textbox {
|
|
496
|
-
&--hint,
|
|
497
|
-
&--error {
|
|
498
|
-
padding-right: px-to-rem(15);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
&.is-show-info {
|
|
504
|
-
.or-textbox {
|
|
505
|
-
&--info {
|
|
506
|
-
display: flex;
|
|
507
|
-
align-items: flex-start;
|
|
508
|
-
justify-content: space-between;
|
|
509
|
-
padding-top: px-to-rem(4);
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
@include disabled {
|
|
515
|
-
.or-textbox {
|
|
516
|
-
&--input-toggle-btn {
|
|
517
|
-
pointer-events: none;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
@include has-error {
|
|
523
|
-
.or-textbox {
|
|
524
|
-
&--input {
|
|
525
|
-
border-color: $c-error;
|
|
526
|
-
|
|
527
|
-
@include hover {
|
|
528
|
-
border-color: $c-error-darken-3;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
@include focus {
|
|
532
|
-
border-color: $c-error-darken-5;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
@include disabled {
|
|
536
|
-
border-color: $c-error;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
}
|
|
322
|
+
@import "./styles.scss";
|
|
542
323
|
</style>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as OrTextarea } from './OrTextarea.vue';
|
|
2
|
+
export { default as OrInput } from './OrInput.vue';
|
|
3
|
+
export { default as OrNumberInput } from './OrNumberInput.vue';
|
|
4
|
+
export { default as OrPassword } from './OrPassword.vue';
|
|
5
|
+
export { default as OrSearch } from './OrSearch.vue';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import OrList from './OrList.vue';
|
|
2
2
|
import { OrIcon } from '../or-icon';
|
|
3
3
|
import { OrButtonV2 as OrButton } from '../or-button-v2';
|
|
4
|
-
import { OrInput } from '../or-
|
|
4
|
+
import { OrInput } from '../or-inputs';
|
|
5
5
|
|
|
6
6
|
import { ArgTypes, Story } from '@storybook/vue';
|
|
7
7
|
import { action } from '@storybook/addon-actions';
|
|
@@ -76,7 +76,7 @@ import { defineComponent, PropType } from 'vue-demi';
|
|
|
76
76
|
import _ from 'lodash';
|
|
77
77
|
|
|
78
78
|
import { OrList } from '../or-list';
|
|
79
|
-
import { OrInput } from '../or-
|
|
79
|
+
import { OrInput } from '../or-inputs';
|
|
80
80
|
import { OrIcon } from '../or-icon';
|
|
81
81
|
import { OrIconButton } from '../or-button-v2';
|
|
82
82
|
|
|
@@ -7,7 +7,7 @@ import { OrOverflowMenu } from '../or-overflow-menu';
|
|
|
7
7
|
import { OrModalSizes } from './constants';
|
|
8
8
|
import { OrCollapse } from '../or-collapse';
|
|
9
9
|
import { OrSelect } from '../or-select';
|
|
10
|
-
import { OrInput } from '../or-
|
|
10
|
+
import { OrInput } from '../or-inputs';
|
|
11
11
|
import { getTestOption } from '../or-select/stories.helpers';
|
|
12
12
|
import _ from 'lodash';
|
|
13
13
|
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import './index-fa6eb4ca.js';
|
|
2
|
-
import { O as OrInput } from './OrInput-df1a14fa.js';
|
|
3
|
-
import { defineComponent, ref } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
4
|
-
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
5
|
-
|
|
6
|
-
var script = defineComponent({
|
|
7
|
-
name: 'OrNumberInput',
|
|
8
|
-
components: {
|
|
9
|
-
OrInput
|
|
10
|
-
},
|
|
11
|
-
model: {
|
|
12
|
-
prop: 'modelValue',
|
|
13
|
-
event: 'update:modelValue'
|
|
14
|
-
},
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: undefined,
|
|
19
|
-
required: false
|
|
20
|
-
},
|
|
21
|
-
htmlId: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: '',
|
|
24
|
-
required: false
|
|
25
|
-
},
|
|
26
|
-
placeholder: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '',
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: '',
|
|
34
|
-
required: false
|
|
35
|
-
},
|
|
36
|
-
error: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: '',
|
|
39
|
-
required: false
|
|
40
|
-
},
|
|
41
|
-
hint: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: '',
|
|
44
|
-
required: false
|
|
45
|
-
},
|
|
46
|
-
minValue: {
|
|
47
|
-
type: Number,
|
|
48
|
-
default: undefined,
|
|
49
|
-
required: false
|
|
50
|
-
},
|
|
51
|
-
maxValue: {
|
|
52
|
-
type: Number,
|
|
53
|
-
default: undefined,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
stepValue: {
|
|
57
|
-
type: Number,
|
|
58
|
-
default: undefined,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
isSmall: Boolean,
|
|
62
|
-
isRequired: Boolean,
|
|
63
|
-
isDisabled: Boolean,
|
|
64
|
-
isReadonly: Boolean,
|
|
65
|
-
isInvalid: Boolean
|
|
66
|
-
},
|
|
67
|
-
emits: ['focus', 'blur', 'update:modelValue', 'input', 'keypress', 'keyup', 'keydown'],
|
|
68
|
-
setup(props, {
|
|
69
|
-
emit
|
|
70
|
-
}) {
|
|
71
|
-
const inputRef = ref();
|
|
72
|
-
if (props.modelValue) {
|
|
73
|
-
if (props.minValue !== undefined && props.modelValue < props.minValue) {
|
|
74
|
-
emit('update:modelValue', props.minValue);
|
|
75
|
-
} else if (props.maxValue !== undefined && props.modelValue > props.maxValue) {
|
|
76
|
-
emit('update:modelValue', props.maxValue);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
inputRef
|
|
81
|
-
};
|
|
82
|
-
},
|
|
83
|
-
computed: {
|
|
84
|
-
htmlInputAttrs() {
|
|
85
|
-
return {
|
|
86
|
-
min: this.minValue,
|
|
87
|
-
max: this.maxValue,
|
|
88
|
-
step: this.stepValue
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
localValue: {
|
|
92
|
-
get() {
|
|
93
|
-
var _a;
|
|
94
|
-
return ((_a = this.modelValue) !== null && _a !== void 0 ? _a : '') + '';
|
|
95
|
-
},
|
|
96
|
-
set(val) {
|
|
97
|
-
if (val === undefined || val === '') {
|
|
98
|
-
this.$emit('update:modelValue', undefined);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const numVal = +val;
|
|
102
|
-
if (this.minValue !== undefined && numVal < this.minValue) {
|
|
103
|
-
this.$emit('update:modelValue', this.minValue);
|
|
104
|
-
} else if (this.maxValue !== undefined && numVal > this.maxValue) {
|
|
105
|
-
this.$emit('update:modelValue', this.maxValue);
|
|
106
|
-
} else {
|
|
107
|
-
this.$emit('update:modelValue', numVal);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
/* script */
|
|
115
|
-
const __vue_script__ = script;
|
|
116
|
-
|
|
117
|
-
/* template */
|
|
118
|
-
var __vue_render__ = function () {
|
|
119
|
-
var _vm = this;
|
|
120
|
-
var _h = _vm.$createElement;
|
|
121
|
-
var _c = _vm._self._c || _h;
|
|
122
|
-
return _c('or-input', {
|
|
123
|
-
ref: "inputRef",
|
|
124
|
-
staticClass: "or-password",
|
|
125
|
-
attrs: {
|
|
126
|
-
"html-id": _vm.htmlId,
|
|
127
|
-
"placeholder": _vm.placeholder,
|
|
128
|
-
"html-type": "number",
|
|
129
|
-
"html-input-attrs": _vm.htmlInputAttrs,
|
|
130
|
-
"label": _vm.label,
|
|
131
|
-
"error": _vm.error,
|
|
132
|
-
"hint": _vm.hint,
|
|
133
|
-
"is-small": _vm.isSmall,
|
|
134
|
-
"is-required": _vm.isRequired,
|
|
135
|
-
"is-disabled": _vm.isDisabled,
|
|
136
|
-
"is-readonly": _vm.isReadonly,
|
|
137
|
-
"is-invalid": _vm.isInvalid
|
|
138
|
-
},
|
|
139
|
-
on: {
|
|
140
|
-
"focus": function ($event) {
|
|
141
|
-
return _vm.$emit('focus', $event);
|
|
142
|
-
},
|
|
143
|
-
"blur": function ($event) {
|
|
144
|
-
return _vm.$emit('blur', $event);
|
|
145
|
-
},
|
|
146
|
-
"input": function ($event) {
|
|
147
|
-
return _vm.$emit('input', $event);
|
|
148
|
-
},
|
|
149
|
-
"keypress": function ($event) {
|
|
150
|
-
return _vm.$emit('keypress', $event);
|
|
151
|
-
},
|
|
152
|
-
"keyup": function ($event) {
|
|
153
|
-
return _vm.$emit('keyup', $event);
|
|
154
|
-
},
|
|
155
|
-
"keydown": function ($event) {
|
|
156
|
-
return _vm.$emit('keydown', $event);
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
scopedSlots: _vm._u([_vm.$slots.prepend ? {
|
|
160
|
-
key: "prepend",
|
|
161
|
-
fn: function () {
|
|
162
|
-
return [_vm._t("prepend")];
|
|
163
|
-
},
|
|
164
|
-
proxy: true
|
|
165
|
-
} : null, _vm.$slots['label-default'] ? {
|
|
166
|
-
key: "label-default",
|
|
167
|
-
fn: function () {
|
|
168
|
-
return [_vm._t("label-default")];
|
|
169
|
-
},
|
|
170
|
-
proxy: true
|
|
171
|
-
} : null, _vm.$slots['label-append'] ? {
|
|
172
|
-
key: "label-append",
|
|
173
|
-
fn: function () {
|
|
174
|
-
return [_vm._t("label-append")];
|
|
175
|
-
},
|
|
176
|
-
proxy: true
|
|
177
|
-
} : null, _vm.$slots['wrapper-end'] ? {
|
|
178
|
-
key: "wrapper-end",
|
|
179
|
-
fn: function () {
|
|
180
|
-
return [_vm._t("wrapper-end")];
|
|
181
|
-
},
|
|
182
|
-
proxy: true
|
|
183
|
-
} : null, _vm.$slots['input-end'] ? {
|
|
184
|
-
key: "input-end",
|
|
185
|
-
fn: function () {
|
|
186
|
-
return [_vm._t("input-end")];
|
|
187
|
-
},
|
|
188
|
-
proxy: true
|
|
189
|
-
} : null, _vm.$slots.append ? {
|
|
190
|
-
key: "append",
|
|
191
|
-
fn: function () {
|
|
192
|
-
return [_vm._t("append")];
|
|
193
|
-
},
|
|
194
|
-
proxy: true
|
|
195
|
-
} : null], null, true),
|
|
196
|
-
model: {
|
|
197
|
-
value: _vm.localValue,
|
|
198
|
-
callback: function ($$v) {
|
|
199
|
-
_vm.localValue = $$v;
|
|
200
|
-
},
|
|
201
|
-
expression: "localValue"
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
var __vue_staticRenderFns__ = [];
|
|
206
|
-
|
|
207
|
-
/* style */
|
|
208
|
-
const __vue_inject_styles__ = undefined;
|
|
209
|
-
/* scoped */
|
|
210
|
-
const __vue_scope_id__ = undefined;
|
|
211
|
-
/* module identifier */
|
|
212
|
-
const __vue_module_identifier__ = undefined;
|
|
213
|
-
/* functional template */
|
|
214
|
-
const __vue_is_functional_template__ = false;
|
|
215
|
-
/* style inject */
|
|
216
|
-
|
|
217
|
-
/* style inject SSR */
|
|
218
|
-
|
|
219
|
-
/* style inject shadow dom */
|
|
220
|
-
|
|
221
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
222
|
-
render: __vue_render__,
|
|
223
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
224
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
225
|
-
var __vue_component__$1 = __vue_component__;
|
|
226
|
-
|
|
227
|
-
export { __vue_component__$1 as _ };
|