@onereach/ui-components 2.75.2-beta.2390.0 → 2.75.2-beta.2391.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-e3986f07.js → OrCardCollection-04e767c2.js} +1 -1
- package/dist/bundled/v2/{OrConfirm-498fa802.js → OrConfirm-a76ff6d2.js} +1 -1
- package/dist/bundled/v2/{OrInlineInput-5f0b99f9.js → OrInlineInput-9304f205.js} +11 -25
- package/dist/bundled/v2/{OrInlineTextarea-975b8706.js → OrInlineTextarea-e0d28fc6.js} +11 -25
- package/dist/bundled/v2/{OrInput-822eb9f5.js → OrInput-b8511a0c.js} +12 -27
- package/dist/bundled/v2/{OrInputBox-9a31d211.js → OrInputBox-e54dcef9.js} +12 -2
- package/dist/bundled/v2/{OrModal-d845da2d.js → OrModal-5f094323.js} +4 -4
- package/dist/bundled/v2/{OrSearch-f9d46a70.js → OrSearch-60b64568.js} +2 -2
- package/dist/bundled/v2/{OrSelect-0c0c01d4.js → OrSelect-752bdd3b.js} +10 -27
- package/dist/bundled/v2/{OrTextarea-c56f19db.js → OrTextarea-5fdf63d0.js} +12 -27
- package/dist/bundled/v2/components/index.js +10 -11
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -5
- package/dist/bundled/v2/components/or-confirm-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
- package/dist/bundled/v2/components/or-inline-input-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
- package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-input-box-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +7 -5
- package/dist/bundled/v2/components/or-input-v3/index.js +2 -3
- package/dist/bundled/v2/components/or-modal-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-select-v3/OrSelect.vue.d.ts +7 -5
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
- package/dist/bundled/v2/components/or-textarea-v3/index.js +2 -3
- package/dist/bundled/v2/index.js +11 -12
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-f2fdaa33.js → OrCardCollection.vue_vue_type_script_lang-e71a0ea0.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-2bb4e530.js → OrConfirm.vue_vue_type_script_lang-b550c3d3.js} +2 -2
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-18853dd7.js → OrInlineInput.vue_vue_type_script_lang-cd4a64f6.js} +5 -3
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-3cb238d6.js → OrInlineTextarea.vue_vue_type_script_lang-a73ff1ee.js} +5 -3
- package/dist/bundled/v3/{OrInput-13a84d53.js → OrInput-6d49f353.js} +9 -12
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-09a6138d.js → OrInput.vue_vue_type_script_lang-af68d0e7.js} +7 -6
- package/dist/bundled/v3/{OrInputBox-44f37541.js → OrInputBox-358d4856.js} +1 -1
- package/dist/{esm/v2/OrInputBox.vue_rollup-plugin-vue_script-4ba46db4.js → bundled/v3/OrInputBox.vue_vue_type_script_lang-b387d4ba.js} +1 -1
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-3f3ce339.js → OrModal.vue_vue_type_script_lang-92339e0f.js} +4 -4
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-9028a3c5.js → OrSearch.vue_vue_type_script_lang-8c37e5a7.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-30c61027.js → OrSelect.vue_vue_type_script_lang-35ac0247.js} +8 -9
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-b2899ba6.js → OrTextarea.vue_vue_type_script_lang-de99a858.js} +7 -6
- package/dist/bundled/v3/components/index.js +12 -13
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -7
- package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -6
- package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-input-box-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +7 -5
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -4
- package/dist/bundled/v3/components/or-modal-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -6
- package/dist/bundled/v3/components/or-select-v3/OrSelect.vue.d.ts +7 -5
- package/dist/bundled/v3/components/or-select-v3/index.js +5 -6
- package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
- package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -4
- package/dist/bundled/v3/index.js +131 -142
- package/dist/esm/v2/{OrCardCollection-59455d23.js → OrCardCollection-f7856175.js} +2 -2
- package/dist/esm/v2/{OrConfirm-b31e3d3d.js → OrConfirm-98d62065.js} +1 -1
- package/dist/esm/v2/{OrInlineInput-36d79e50.js → OrInlineInput-df02ab5d.js} +11 -25
- package/dist/esm/v2/{OrInlineTextarea-e2d61e44.js → OrInlineTextarea-ad120656.js} +11 -25
- package/dist/esm/v2/{OrInput-06003aad.js → OrInput-3bb91436.js} +12 -27
- package/dist/{bundled/v3/OrInputBox.vue_vue_type_script_lang-c4f9c8ef.js → esm/v2/OrInputBox-53d1f66d.js} +53 -3
- package/dist/esm/v2/{OrModal-370cfc3b.js → OrModal-407f3ac7.js} +4 -4
- package/dist/esm/v2/{OrSearch-44645202.js → OrSearch-dad9b02f.js} +2 -2
- package/dist/esm/v2/{OrSelect-a51044ed.js → OrSelect-7ef80130.js} +10 -27
- package/dist/esm/v2/{OrTextarea-5fa93c9a.js → OrTextarea-0a64f718.js} +12 -27
- package/dist/esm/v2/components/index.js +10 -11
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -5
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -4
- package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
- package/dist/esm/v2/components/or-inline-input-v3/index.js +1 -1
- package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +1 -1
- package/dist/esm/v2/components/or-input-box-v3/index.js +2 -3
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +7 -5
- package/dist/esm/v2/components/or-input-v3/index.js +2 -3
- package/dist/esm/v2/components/or-modal-v3/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +3 -4
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +7 -5
- package/dist/esm/v2/components/or-select-v3/index.js +3 -4
- package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
- package/dist/esm/v2/components/or-textarea-v3/index.js +2 -3
- package/dist/esm/v2/index.js +10 -11
- package/dist/esm/v3/{OrCardCollection-5c0d53e0.js → OrCardCollection-4cb41408.js} +1 -1
- package/dist/esm/v3/{OrConfirm-c7304c10.js → OrConfirm-19da64d1.js} +1 -1
- package/dist/esm/v3/{OrInlineInput-651c9155.js → OrInlineInput-cd3753ee.js} +14 -14
- package/dist/esm/v3/{OrInlineTextarea-d16af66a.js → OrInlineTextarea-4c5b0390.js} +14 -14
- package/dist/esm/v3/{OrInput-b3939d15.js → OrInput-ae9f6871.js} +13 -14
- package/dist/esm/v3/{OrModal-f9f2279b.js → OrModal-17c3a1cb.js} +4 -4
- package/dist/esm/v3/{OrSearch-d16d0331.js → OrSearch-6f6b4fcd.js} +1 -1
- package/dist/esm/v3/{OrSelect-19c2e7d2.js → OrSelect-96bf9b63.js} +13 -16
- package/dist/esm/v3/{OrTextarea-dfc6a453.js → OrTextarea-42d21f77.js} +13 -14
- package/dist/esm/v3/components/index.js +9 -9
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -3
- package/dist/esm/v3/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +7 -5
- package/dist/esm/v3/components/or-inline-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +7 -5
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +1 -1
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +7 -5
- package/dist/esm/v3/components/or-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-modal-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +7 -5
- package/dist/esm/v3/components/or-select-v3/index.js +2 -2
- package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +7 -5
- package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
- package/dist/esm/v3/index.js +9 -9
- package/package.json +2 -2
- package/src/components/or-inline-input-v3/OrInlineInput.vue +9 -12
- package/src/components/or-inline-input-v3/styles.ts +2 -2
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +9 -12
- package/src/components/or-inline-textarea-v3/styles.ts +2 -2
- package/src/components/or-input-v3/OrInput.vue +9 -12
- package/src/components/or-input-v3/styles.ts +2 -2
- package/src/components/or-modal-v3/OrModal.stories3.ts +19 -0
- package/src/components/or-modal-v3/styles.ts +1 -4
- package/src/components/or-select-v3/OrSelect.stories3.ts +0 -4
- package/src/components/or-select-v3/OrSelect.vue +8 -12
- package/src/components/or-select-v3/styles.ts +1 -4
- package/src/components/or-textarea-v3/OrTextarea.vue +9 -12
- package/src/components/or-textarea-v3/styles.ts +2 -2
- package/dist/bundled/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
- package/dist/bundled/v2/components/or-combined-input-v3/index.d.ts +0 -2
- package/dist/bundled/v2/components/or-combined-input-v3/index.js +0 -162
- package/dist/bundled/v2/components/or-combined-input-v3/props.d.ts +0 -1
- package/dist/bundled/v2/components/or-combined-input-v3/styles.d.ts +0 -2
- package/dist/bundled/v2/props-78496a2d.js +0 -12
- package/dist/bundled/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
- package/dist/bundled/v3/components/or-combined-input-v3/index.d.ts +0 -2
- package/dist/bundled/v3/components/or-combined-input-v3/index.js +0 -131
- package/dist/bundled/v3/components/or-combined-input-v3/props.d.ts +0 -1
- package/dist/bundled/v3/components/or-combined-input-v3/styles.d.ts +0 -2
- package/dist/bundled/v3/props-78496a2d.js +0 -12
- package/dist/esm/v2/OrInputBox-5c4b3104.js +0 -43
- package/dist/esm/v2/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
- package/dist/esm/v2/components/or-combined-input-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-combined-input-v3/index.js +0 -159
- package/dist/esm/v2/components/or-combined-input-v3/props.d.ts +0 -1
- package/dist/esm/v2/components/or-combined-input-v3/styles.d.ts +0 -2
- package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +0 -105
- package/dist/esm/v3/components/or-combined-input-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-combined-input-v3/index.js +0 -130
- package/dist/esm/v3/components/or-combined-input-v3/props.d.ts +0 -1
- package/dist/esm/v3/components/or-combined-input-v3/styles.d.ts +0 -2
- package/src/components/or-combined-input-v3/OrCombinedInput.docs.mdx +0 -7
- package/src/components/or-combined-input-v3/OrCombinedInput.stories3.ts +0 -201
- package/src/components/or-combined-input-v3/OrCombinedInput.vue +0 -133
- package/src/components/or-combined-input-v3/index.ts +0 -2
- package/src/components/or-combined-input-v3/props.ts +0 -1
- package/src/components/or-combined-input-v3/styles.ts +0 -25
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<OrInputBox
|
|
22
22
|
:variant="disableDefaultStyles ? 'unstyled' : 'styled'"
|
|
23
23
|
:size="size"
|
|
24
|
-
:invalid="
|
|
24
|
+
:invalid="invalid"
|
|
25
25
|
:readonly="readonly || loading"
|
|
26
26
|
:disabled="disabled"
|
|
27
27
|
>
|
|
@@ -82,10 +82,7 @@
|
|
|
82
82
|
</div>
|
|
83
83
|
</OrInputBox>
|
|
84
84
|
|
|
85
|
-
<
|
|
86
|
-
v-show="!error"
|
|
87
|
-
:class="['contents']"
|
|
88
|
-
>
|
|
85
|
+
<template v-if="!invalid">
|
|
89
86
|
<template v-if="hint || maxLength">
|
|
90
87
|
<OrHint :disabled="disabled">
|
|
91
88
|
{{ hint }}
|
|
@@ -98,12 +95,9 @@
|
|
|
98
95
|
</template>
|
|
99
96
|
</OrHint>
|
|
100
97
|
</template>
|
|
101
|
-
</
|
|
98
|
+
</template>
|
|
102
99
|
|
|
103
|
-
<
|
|
104
|
-
v-show="typeof error === 'string'"
|
|
105
|
-
:class="['contents']"
|
|
106
|
-
>
|
|
100
|
+
<template v-else>
|
|
107
101
|
<OrError :disabled="disabled">
|
|
108
102
|
{{ error }}
|
|
109
103
|
|
|
@@ -114,7 +108,7 @@
|
|
|
114
108
|
{{ currentLength }} / {{ maxLength }}
|
|
115
109
|
</template>
|
|
116
110
|
</OrError>
|
|
117
|
-
</
|
|
111
|
+
</template>
|
|
118
112
|
</div>
|
|
119
113
|
</template>
|
|
120
114
|
|
|
@@ -181,7 +175,7 @@ export default defineComponent({
|
|
|
181
175
|
},
|
|
182
176
|
|
|
183
177
|
error: {
|
|
184
|
-
type:
|
|
178
|
+
type: String,
|
|
185
179
|
default: undefined,
|
|
186
180
|
},
|
|
187
181
|
|
|
@@ -265,6 +259,8 @@ export default defineComponent({
|
|
|
265
259
|
const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
|
|
266
260
|
const maxLength = computed(() => controlAttributes.maxlength);
|
|
267
261
|
|
|
262
|
+
const invalid = computed(() => !!props.error);
|
|
263
|
+
|
|
268
264
|
const disclosed = ref(false);
|
|
269
265
|
|
|
270
266
|
const { isMobile } = useResponsive();
|
|
@@ -287,6 +283,7 @@ export default defineComponent({
|
|
|
287
283
|
proxyModelValue,
|
|
288
284
|
currentLength,
|
|
289
285
|
maxLength,
|
|
286
|
+
invalid,
|
|
290
287
|
disclosed,
|
|
291
288
|
isMobile,
|
|
292
289
|
focus,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
3
|
import { ref } from 'vue-demi';
|
|
4
|
+
import Faker from 'faker';
|
|
4
5
|
import { OrButtonV3 as OrButton } from '../or-button-v3';
|
|
5
6
|
import OrModalDocs from './OrModal.docs.mdx';
|
|
6
7
|
import OrModal from './OrModal.vue';
|
|
@@ -257,3 +258,21 @@ zIndex.args = {
|
|
|
257
258
|
</div>
|
|
258
259
|
`,
|
|
259
260
|
};
|
|
261
|
+
|
|
262
|
+
export const WithVerticalScroll = Template.bind({});
|
|
263
|
+
|
|
264
|
+
WithVerticalScroll.args = {
|
|
265
|
+
header: 'Upload Files',
|
|
266
|
+
default: `
|
|
267
|
+
<div class="flex items-center justify-center">
|
|
268
|
+
${Faker.lorem.lines(50)}
|
|
269
|
+
</div>
|
|
270
|
+
`,
|
|
271
|
+
|
|
272
|
+
footer: `
|
|
273
|
+
<div class="flex items-center justify-end gap-[16px]">
|
|
274
|
+
<OrButton variant="outlined">Save</OrButton>
|
|
275
|
+
<OrButton>Upload</OrButton>
|
|
276
|
+
</div>
|
|
277
|
+
`,
|
|
278
|
+
};
|
|
@@ -6,7 +6,7 @@ export const ModalRoot: string[] = [
|
|
|
6
6
|
|
|
7
7
|
// Box
|
|
8
8
|
'w-full',
|
|
9
|
-
'h-full',
|
|
9
|
+
'h-full md:h-auto md:max-h-[min(calc(100%-(2*theme(spacing.3xl))),772px)]',
|
|
10
10
|
|
|
11
11
|
// Shape
|
|
12
12
|
'md:rounded-md',
|
|
@@ -36,19 +36,16 @@ export const ModalRootSizes: Record<ModalSize, string[]> = {
|
|
|
36
36
|
'l': [
|
|
37
37
|
// Box
|
|
38
38
|
'md:w-[1050px]',
|
|
39
|
-
'md:h-auto',
|
|
40
39
|
],
|
|
41
40
|
|
|
42
41
|
'm': [
|
|
43
42
|
// Box
|
|
44
43
|
'md:w-[700px]',
|
|
45
|
-
'md:h-auto',
|
|
46
44
|
],
|
|
47
45
|
|
|
48
46
|
's': [
|
|
49
47
|
// Box
|
|
50
48
|
'md:w-[480px]',
|
|
51
|
-
'md:h-auto',
|
|
52
49
|
],
|
|
53
50
|
};
|
|
54
51
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:class="[popoverState === 'open' && 'rounded-b-0']"
|
|
26
26
|
:variant="disableDefaultStyles ? 'unstyled' : 'styled'"
|
|
27
27
|
:size="size"
|
|
28
|
-
:invalid="
|
|
28
|
+
:invalid="invalid"
|
|
29
29
|
:readonly="readonly"
|
|
30
30
|
:disabled="disabled"
|
|
31
31
|
>
|
|
@@ -202,25 +202,19 @@
|
|
|
202
202
|
</OrPopover>
|
|
203
203
|
</OrInputBox>
|
|
204
204
|
|
|
205
|
-
<
|
|
206
|
-
v-show="!error"
|
|
207
|
-
:class="['contents']"
|
|
208
|
-
>
|
|
205
|
+
<template v-if="!invalid">
|
|
209
206
|
<template v-if="hint">
|
|
210
207
|
<OrHint :disabled="disabled">
|
|
211
208
|
{{ hint }}
|
|
212
209
|
</OrHint>
|
|
213
210
|
</template>
|
|
214
|
-
</
|
|
211
|
+
</template>
|
|
215
212
|
|
|
216
|
-
<
|
|
217
|
-
v-show="typeof error === 'string'"
|
|
218
|
-
:class="['contents']"
|
|
219
|
-
>
|
|
213
|
+
<template v-else>
|
|
220
214
|
<OrError :disabled="disabled">
|
|
221
215
|
{{ error }}
|
|
222
216
|
</OrError>
|
|
223
|
-
</
|
|
217
|
+
</template>
|
|
224
218
|
</div>
|
|
225
219
|
</template>
|
|
226
220
|
|
|
@@ -312,7 +306,7 @@ export default defineComponent({
|
|
|
312
306
|
},
|
|
313
307
|
|
|
314
308
|
error: {
|
|
315
|
-
type:
|
|
309
|
+
type: String,
|
|
316
310
|
default: undefined,
|
|
317
311
|
},
|
|
318
312
|
|
|
@@ -422,6 +416,7 @@ export default defineComponent({
|
|
|
422
416
|
}
|
|
423
417
|
});
|
|
424
418
|
|
|
419
|
+
const invalid = computed(() => !!props.error);
|
|
425
420
|
const readonly = computed(() => context.attrs.readonly as boolean);
|
|
426
421
|
|
|
427
422
|
const selection = computed(() => {
|
|
@@ -524,6 +519,7 @@ export default defineComponent({
|
|
|
524
519
|
noSearchResultsStyles,
|
|
525
520
|
controlId,
|
|
526
521
|
proxyModelValue,
|
|
522
|
+
invalid,
|
|
527
523
|
readonly,
|
|
528
524
|
selection,
|
|
529
525
|
searchText,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
<OrInputBox
|
|
22
22
|
:size="size"
|
|
23
|
-
:invalid="
|
|
23
|
+
:invalid="invalid"
|
|
24
24
|
:readonly="readonly"
|
|
25
25
|
:disabled="disabled"
|
|
26
26
|
>
|
|
@@ -40,10 +40,7 @@
|
|
|
40
40
|
/>
|
|
41
41
|
</OrInputBox>
|
|
42
42
|
|
|
43
|
-
<
|
|
44
|
-
v-show="!error"
|
|
45
|
-
:class="['contents']"
|
|
46
|
-
>
|
|
43
|
+
<template v-if="!invalid">
|
|
47
44
|
<template v-if="hint || maxLength">
|
|
48
45
|
<OrHint :disabled="disabled">
|
|
49
46
|
{{ hint }}
|
|
@@ -56,12 +53,9 @@
|
|
|
56
53
|
</template>
|
|
57
54
|
</OrHint>
|
|
58
55
|
</template>
|
|
59
|
-
</
|
|
56
|
+
</template>
|
|
60
57
|
|
|
61
|
-
<
|
|
62
|
-
v-show="typeof error === 'string'"
|
|
63
|
-
:class="['contents']"
|
|
64
|
-
>
|
|
58
|
+
<template v-else>
|
|
65
59
|
<OrError :disabled="disabled">
|
|
66
60
|
{{ error }}
|
|
67
61
|
|
|
@@ -72,7 +66,7 @@
|
|
|
72
66
|
{{ currentLength }} / {{ maxLength }}
|
|
73
67
|
</template>
|
|
74
68
|
</OrError>
|
|
75
|
-
</
|
|
69
|
+
</template>
|
|
76
70
|
</div>
|
|
77
71
|
</template>
|
|
78
72
|
|
|
@@ -128,7 +122,7 @@ export default defineComponent({
|
|
|
128
122
|
},
|
|
129
123
|
|
|
130
124
|
error: {
|
|
131
|
-
type:
|
|
125
|
+
type: String,
|
|
132
126
|
default: undefined,
|
|
133
127
|
},
|
|
134
128
|
|
|
@@ -197,6 +191,8 @@ export default defineComponent({
|
|
|
197
191
|
const currentLength = computed(() => proxyModelValue.value?.toString().length ?? 0);
|
|
198
192
|
const maxLength = computed(() => controlAttributes.maxlength);
|
|
199
193
|
|
|
194
|
+
const invalid = computed(() => !!props.error);
|
|
195
|
+
|
|
200
196
|
// Methods
|
|
201
197
|
function focus(): void {
|
|
202
198
|
control.value?.focus();
|
|
@@ -215,6 +211,7 @@ export default defineComponent({
|
|
|
215
211
|
proxyModelValue,
|
|
216
212
|
currentLength,
|
|
217
213
|
maxLength,
|
|
214
|
+
invalid,
|
|
218
215
|
focus,
|
|
219
216
|
blur,
|
|
220
217
|
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue-demi';
|
|
2
|
-
import { CombinedInputSize } from './props';
|
|
3
|
-
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
|
-
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
|
-
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
6
|
-
controlGroup: import("@vue/composition-api").ComputedRef<string[]>;
|
|
7
|
-
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
8
|
-
size: {
|
|
9
|
-
type: PropType<CombinedInputSize>;
|
|
10
|
-
default: CombinedInputSize;
|
|
11
|
-
};
|
|
12
|
-
label: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: undefined;
|
|
15
|
-
};
|
|
16
|
-
hint: {
|
|
17
|
-
type: StringConstructor;
|
|
18
|
-
default: undefined;
|
|
19
|
-
};
|
|
20
|
-
error: {
|
|
21
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
22
|
-
default: undefined;
|
|
23
|
-
};
|
|
24
|
-
required: {
|
|
25
|
-
type: BooleanConstructor;
|
|
26
|
-
default: boolean;
|
|
27
|
-
};
|
|
28
|
-
readonly: {
|
|
29
|
-
type: BooleanConstructor;
|
|
30
|
-
default: boolean;
|
|
31
|
-
};
|
|
32
|
-
disabled: {
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
|
-
disableDefaultStyles: {
|
|
37
|
-
type: BooleanConstructor;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
41
|
-
size: {
|
|
42
|
-
type: PropType<CombinedInputSize>;
|
|
43
|
-
default: CombinedInputSize;
|
|
44
|
-
};
|
|
45
|
-
label: {
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
default: undefined;
|
|
48
|
-
};
|
|
49
|
-
hint: {
|
|
50
|
-
type: StringConstructor;
|
|
51
|
-
default: undefined;
|
|
52
|
-
};
|
|
53
|
-
error: {
|
|
54
|
-
type: (BooleanConstructor | StringConstructor)[];
|
|
55
|
-
default: undefined;
|
|
56
|
-
};
|
|
57
|
-
required: {
|
|
58
|
-
type: BooleanConstructor;
|
|
59
|
-
default: boolean;
|
|
60
|
-
};
|
|
61
|
-
readonly: {
|
|
62
|
-
type: BooleanConstructor;
|
|
63
|
-
default: boolean;
|
|
64
|
-
};
|
|
65
|
-
disabled: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
|
-
disableDefaultStyles: {
|
|
70
|
-
type: BooleanConstructor;
|
|
71
|
-
default: boolean;
|
|
72
|
-
};
|
|
73
|
-
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
74
|
-
size: CombinedInputSize;
|
|
75
|
-
label: string;
|
|
76
|
-
hint: string;
|
|
77
|
-
error: string | boolean;
|
|
78
|
-
required: boolean;
|
|
79
|
-
readonly: boolean;
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
disableDefaultStyles: boolean;
|
|
82
|
-
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
83
|
-
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
84
|
-
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
85
|
-
controlGroup: import("@vue/composition-api").ComputedRef<string[]>;
|
|
86
|
-
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
87
|
-
size: CombinedInputSize;
|
|
88
|
-
label: string;
|
|
89
|
-
hint: string;
|
|
90
|
-
error: string | boolean;
|
|
91
|
-
required: boolean;
|
|
92
|
-
readonly: boolean;
|
|
93
|
-
disabled: boolean;
|
|
94
|
-
disableDefaultStyles: boolean;
|
|
95
|
-
} & {}, {
|
|
96
|
-
size: CombinedInputSize;
|
|
97
|
-
label: string;
|
|
98
|
-
hint: string;
|
|
99
|
-
error: string | boolean;
|
|
100
|
-
required: boolean;
|
|
101
|
-
readonly: boolean;
|
|
102
|
-
disabled: boolean;
|
|
103
|
-
disableDefaultStyles: boolean;
|
|
104
|
-
}, true>);
|
|
105
|
-
export default _default;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import '../../index-fa6eb4ca.js';
|
|
2
|
-
import { O as OrError } from '../../OrError-52f668a4.js';
|
|
3
|
-
import { O as OrHint } from '../../OrHint-fde53334.js';
|
|
4
|
-
import { O as OrLabel } from '../../OrLabel-aff09c39.js';
|
|
5
|
-
import { defineComponent, ref, computed } from '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
6
|
-
import { a as InputBoxSize } from '../../props-78496a2d.js';
|
|
7
|
-
export { a as CombinedInputSize } from '../../props-78496a2d.js';
|
|
8
|
-
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
9
|
-
import 'vue';
|
|
10
|
-
|
|
11
|
-
const CombinedInputRoot = [
|
|
12
|
-
// Layout
|
|
13
|
-
'layout-column',
|
|
14
|
-
// Spacing
|
|
15
|
-
'gap-xs'];
|
|
16
|
-
const CombinedInputControlGroup = [
|
|
17
|
-
// Layout
|
|
18
|
-
'layout-row',
|
|
19
|
-
// Box
|
|
20
|
-
'w-full',
|
|
21
|
-
// Shape (.or-input-box)
|
|
22
|
-
'[&_.or-input-box]:first-child:rounded-r-0', '[&_.or-input-box]:intermediate-child:rounded-0', '[&_.or-input-box]:last-child:rounded-l-0',
|
|
23
|
-
// Spacing (.or-input-box)
|
|
24
|
-
'[&_.or-input-box]:first-child:mr-[-1px]', '[&_.or-input-box]:intermediate-child:border-x-0', '[&_.or-input-box]:last-child:ml-[-1px]'];
|
|
25
|
-
|
|
26
|
-
var script = defineComponent({
|
|
27
|
-
name: 'OrCombinedInput',
|
|
28
|
-
components: {
|
|
29
|
-
OrError,
|
|
30
|
-
OrHint,
|
|
31
|
-
OrLabel
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
size: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: InputBoxSize.M
|
|
37
|
-
},
|
|
38
|
-
label: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: undefined
|
|
41
|
-
},
|
|
42
|
-
hint: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: undefined
|
|
45
|
-
},
|
|
46
|
-
error: {
|
|
47
|
-
type: [String, Boolean],
|
|
48
|
-
default: undefined
|
|
49
|
-
},
|
|
50
|
-
required: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
},
|
|
54
|
-
readonly: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
disabled: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false
|
|
61
|
-
},
|
|
62
|
-
disableDefaultStyles: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
setup(props, context) {
|
|
68
|
-
// Refs
|
|
69
|
-
const root = ref();
|
|
70
|
-
// Styles
|
|
71
|
-
const rootStyles = computed(() => ['or-combined-input', ...CombinedInputRoot]);
|
|
72
|
-
const controlGroup = computed(() => [...CombinedInputControlGroup]);
|
|
73
|
-
return {
|
|
74
|
-
root,
|
|
75
|
-
rootStyles,
|
|
76
|
-
controlGroup
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
/* script */
|
|
82
|
-
const __vue_script__ = script;
|
|
83
|
-
|
|
84
|
-
/* template */
|
|
85
|
-
var __vue_render__ = function () {
|
|
86
|
-
var _vm = this;
|
|
87
|
-
var _h = _vm.$createElement;
|
|
88
|
-
var _c = _vm._self._c || _h;
|
|
89
|
-
return _c('div', {
|
|
90
|
-
ref: "root",
|
|
91
|
-
class: _vm.rootStyles
|
|
92
|
-
}, [_vm.label ? [_c('OrLabel', {
|
|
93
|
-
attrs: {
|
|
94
|
-
"variant": 'input',
|
|
95
|
-
"required": _vm.required,
|
|
96
|
-
"disabled": _vm.disabled
|
|
97
|
-
},
|
|
98
|
-
scopedSlots: _vm._u([{
|
|
99
|
-
key: "addon",
|
|
100
|
-
fn: function () {
|
|
101
|
-
return [_vm._t("addon")];
|
|
102
|
-
},
|
|
103
|
-
proxy: true
|
|
104
|
-
}], null, true)
|
|
105
|
-
}, [_vm._v("\n " + _vm._s(_vm.label) + "\n\n ")])] : _vm._e(), _vm._v(" "), _c('div', {
|
|
106
|
-
class: _vm.controlGroup
|
|
107
|
-
}, [_vm._t("default", null, {
|
|
108
|
-
"size": _vm.size,
|
|
109
|
-
"error": !!_vm.error,
|
|
110
|
-
"required": _vm.required,
|
|
111
|
-
"readonly": _vm.readonly,
|
|
112
|
-
"disabled": _vm.disabled,
|
|
113
|
-
"disableDefaultStyles": _vm.disableDefaultStyles
|
|
114
|
-
})], 2), _vm._v(" "), _c('div', {
|
|
115
|
-
directives: [{
|
|
116
|
-
name: "show",
|
|
117
|
-
rawName: "v-show",
|
|
118
|
-
value: !_vm.error,
|
|
119
|
-
expression: "!error"
|
|
120
|
-
}],
|
|
121
|
-
class: ['contents']
|
|
122
|
-
}, [_vm.hint ? [_c('OrHint', {
|
|
123
|
-
attrs: {
|
|
124
|
-
"disabled": _vm.disabled
|
|
125
|
-
}
|
|
126
|
-
}, [_vm._v("\n " + _vm._s(_vm.hint) + "\n ")])] : _vm._e()], 2), _vm._v(" "), _c('div', {
|
|
127
|
-
directives: [{
|
|
128
|
-
name: "show",
|
|
129
|
-
rawName: "v-show",
|
|
130
|
-
value: typeof _vm.error === 'string',
|
|
131
|
-
expression: "typeof error === 'string'"
|
|
132
|
-
}],
|
|
133
|
-
class: ['contents']
|
|
134
|
-
}, [_c('OrError', {
|
|
135
|
-
attrs: {
|
|
136
|
-
"disabled": _vm.disabled
|
|
137
|
-
}
|
|
138
|
-
}, [_vm._v("\n " + _vm._s(_vm.error) + "\n ")])], 1)], 2);
|
|
139
|
-
};
|
|
140
|
-
var __vue_staticRenderFns__ = [];
|
|
141
|
-
|
|
142
|
-
/* style */
|
|
143
|
-
const __vue_inject_styles__ = undefined;
|
|
144
|
-
/* scoped */
|
|
145
|
-
const __vue_scope_id__ = undefined;
|
|
146
|
-
/* module identifier */
|
|
147
|
-
const __vue_module_identifier__ = undefined;
|
|
148
|
-
/* functional template */
|
|
149
|
-
const __vue_is_functional_template__ = false;
|
|
150
|
-
/* style inject */
|
|
151
|
-
|
|
152
|
-
/* style inject SSR */
|
|
153
|
-
|
|
154
|
-
/* style inject shadow dom */
|
|
155
|
-
|
|
156
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
157
|
-
render: __vue_render__,
|
|
158
|
-
staticRenderFns: __vue_staticRenderFns__
|
|
159
|
-
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
160
|
-
var __vue_component__$1 = __vue_component__;
|
|
161
|
-
|
|
162
|
-
export { __vue_component__$1 as OrCombinedInputV3 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { InputBoxSize as CombinedInputSize } from '../or-input-box-v3';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var InputBoxVariant;
|
|
2
|
-
(function (InputBoxVariant) {
|
|
3
|
-
InputBoxVariant["Styled"] = "styled";
|
|
4
|
-
InputBoxVariant["Unstyled"] = "unstyled";
|
|
5
|
-
})(InputBoxVariant || (InputBoxVariant = {}));
|
|
6
|
-
var InputBoxSize;
|
|
7
|
-
(function (InputBoxSize) {
|
|
8
|
-
InputBoxSize["M"] = "m";
|
|
9
|
-
InputBoxSize["S"] = "s";
|
|
10
|
-
})(InputBoxSize || (InputBoxSize = {}));
|
|
11
|
-
|
|
12
|
-
export { InputBoxVariant as I, InputBoxSize as a };
|