@onereach/ui-components 2.70.2-beta.2199.0 → 2.70.2-beta.2203.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-1bb83cfb.js → OrCardCollection-0141a358.js} +1 -1
- package/dist/bundled/v2/{OrCheckbox-251ecafc.js → OrCheckbox-dbef9f9a.js} +17 -32
- package/dist/bundled/v2/{OrConfirm-4cae7867.js → OrConfirm-057e997e.js} +13 -6
- package/dist/bundled/v2/{OrInlineInput-2133e469.js → OrInlineInput-87589946.js} +22 -38
- package/dist/bundled/v2/{OrInlineTextarea-d61ca596.js → OrInlineTextarea-21b0e6fc.js} +18 -34
- package/dist/bundled/v2/{OrInput-770f1bed.js → OrInput-82ccfe00.js} +30 -38
- package/dist/bundled/v2/{OrPagination-468d0964.js → OrPagination-379c10b8.js} +1 -1
- package/dist/bundled/v2/{OrRadio-ae89bc9b.js → OrRadio-cd39b20b.js} +15 -30
- package/dist/bundled/v2/{OrSearch-2e5f9e24.js → OrSearch-53470b0e.js} +1 -1
- package/dist/bundled/v2/{OrSelect-039c0711.js → OrSelect-c49e1bcf.js} +2 -2
- package/dist/bundled/v2/{OrSwitch-20640a05.js → OrSwitch-237a2081.js} +15 -30
- package/dist/bundled/v2/{OrTabs-85aefcba.js → OrTabs-42f7c52c.js} +1 -1
- package/dist/bundled/v2/{OrTextarea-0ff8063b.js → OrTextarea-5593fbe9.js} +20 -39
- package/dist/bundled/v2/components/index.js +13 -15
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +3 -5
- package/dist/bundled/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +2 -18
- package/dist/bundled/v2/components/or-checkbox-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +4 -6
- package/dist/bundled/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +6 -36
- package/dist/bundled/v2/components/or-inline-input-v3/index.js +1 -3
- package/dist/bundled/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +6 -36
- package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +1 -3
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +8 -43
- package/dist/bundled/v2/components/or-input-v3/index.js +1 -3
- package/dist/bundled/v2/components/or-pagination-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-radio-v3/OrRadio.vue.d.ts +2 -18
- package/dist/bundled/v2/components/or-radio-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-search-v3/index.js +2 -4
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -5
- package/dist/bundled/v2/components/or-switch-v3/OrSwitch.vue.d.ts +2 -18
- package/dist/bundled/v2/components/or-switch-v3/index.js +1 -2
- package/dist/bundled/v2/components/or-tabs-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +6 -45
- package/dist/bundled/v2/components/or-textarea-v3/index.js +1 -3
- package/dist/bundled/v2/hooks/index.d.ts +0 -3
- package/dist/bundled/v2/hooks/index.js +0 -2
- package/dist/bundled/v2/index.js +14 -16
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-a0f29a55.js → OrCardCollection.vue_vue_type_script_lang-2d78a51a.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-2024ec32.js → OrCheckbox.vue_vue_type_script_lang-8b36e06c.js} +7 -22
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-7d9d3810.js → OrConfirm.vue_vue_type_script_lang-9d9a3917.js} +14 -7
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-40f0073f.js → OrInlineInput.vue_vue_type_script_lang-67218502.js} +11 -27
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-2817edd5.js → OrInlineTextarea.vue_vue_type_script_lang-a1831ab8.js} +11 -27
- package/dist/bundled/v3/{OrInput-e325a104.js → OrInput-a4f220ed.js} +12 -12
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-fd850b82.js → OrInput.vue_vue_type_script_lang-607d79d4.js} +15 -26
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-0d9daaa7.js → OrPagination.vue_vue_type_script_lang-c96d7cd7.js} +1 -1
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-29e8b856.js → OrRadio.vue_vue_type_script_lang-2e666a56.js} +7 -22
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-480f4b1c.js → OrSearch.vue_vue_type_script_lang-06f318ca.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-7aa8956a.js → OrSelect.vue_vue_type_script_lang-58e5a52b.js} +15 -17
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-02b4913a.js → OrSwitch.vue_vue_type_script_lang-04829f64.js} +7 -22
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-01188224.js → OrTabs.vue_vue_type_script_lang-61b79a5a.js} +1 -1
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-2fdac7b2.js → OrTextarea.vue_vue_type_script_lang-8e3531cd.js} +12 -31
- package/dist/bundled/v3/components/index.js +14 -16
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +4 -6
- package/dist/bundled/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +2 -18
- package/dist/bundled/v3/components/or-checkbox-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-confirm-v3/index.js +4 -6
- package/dist/bundled/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +6 -36
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +1 -3
- package/dist/bundled/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +6 -36
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +1 -3
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +8 -43
- package/dist/bundled/v3/components/or-input-v3/index.js +1 -3
- package/dist/bundled/v3/components/or-pagination-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-radio-v3/OrRadio.vue.d.ts +2 -18
- package/dist/bundled/v3/components/or-radio-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-search-v3/index.js +3 -5
- package/dist/bundled/v3/components/or-select-v3/index.js +4 -6
- package/dist/bundled/v3/components/or-switch-v3/OrSwitch.vue.d.ts +2 -18
- package/dist/bundled/v3/components/or-switch-v3/index.js +1 -2
- package/dist/bundled/v3/components/or-tabs-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +6 -45
- package/dist/bundled/v3/components/or-textarea-v3/index.js +1 -3
- package/dist/bundled/v3/hooks/index.d.ts +0 -3
- package/dist/bundled/v3/hooks/index.js +0 -2
- package/dist/bundled/v3/index.js +69 -77
- package/dist/esm/v2/{OrCardCollection-784318ac.js → OrCardCollection-3c38fc85.js} +1 -1
- package/dist/esm/v2/{OrCheckbox-7317fe1a.js → OrCheckbox-567e387c.js} +17 -32
- package/dist/esm/v2/{OrConfirm-3d064f6c.js → OrConfirm-047d4086.js} +13 -6
- package/dist/esm/v2/{OrInlineInput-7c4f1f92.js → OrInlineInput-10205811.js} +22 -38
- package/dist/esm/v2/{OrInlineTextarea-3381e2a9.js → OrInlineTextarea-7658611e.js} +18 -34
- package/dist/esm/v2/{OrInput-e10cc643.js → OrInput-ada3a970.js} +30 -38
- package/dist/esm/v2/{OrPagination-291bd1b9.js → OrPagination-c0dbec6a.js} +1 -1
- package/dist/esm/v2/{OrRadio-b0a560d2.js → OrRadio-848ce55d.js} +15 -30
- package/dist/esm/v2/{OrSearch-1490c00b.js → OrSearch-0f08f2f5.js} +1 -1
- package/dist/esm/v2/{OrSelect-1fbeed4f.js → OrSelect-1d705445.js} +2 -2
- package/dist/esm/v2/{OrSwitch-133052ca.js → OrSwitch-13b6a7ee.js} +15 -30
- package/dist/esm/v2/{OrTabs-e5b81f4b.js → OrTabs-71bd3fd2.js} +1 -1
- package/dist/esm/v2/{OrTextarea-a7c846da.js → OrTextarea-6712a150.js} +20 -39
- package/dist/esm/v2/components/index.js +13 -15
- package/dist/esm/v2/components/or-card-collection-v3/index.js +3 -5
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +2 -18
- package/dist/esm/v2/components/or-checkbox-v3/index.js +1 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +8 -10
- package/dist/esm/v2/components/or-inline-input-v3/OrInlineInput.vue.d.ts +6 -36
- package/dist/esm/v2/components/or-inline-input-v3/index.js +1 -3
- package/dist/esm/v2/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +6 -36
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +1 -3
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +8 -43
- package/dist/esm/v2/components/or-input-v3/index.js +1 -3
- package/dist/esm/v2/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v2/components/or-radio-v3/OrRadio.vue.d.ts +2 -18
- package/dist/esm/v2/components/or-radio-v3/index.js +1 -2
- package/dist/esm/v2/components/or-search-v3/index.js +2 -4
- package/dist/esm/v2/components/or-select-v3/index.js +3 -5
- package/dist/esm/v2/components/or-switch-v3/OrSwitch.vue.d.ts +2 -18
- package/dist/esm/v2/components/or-switch-v3/index.js +1 -2
- package/dist/esm/v2/components/or-tabs-v3/index.js +1 -1
- package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +6 -45
- package/dist/esm/v2/components/or-textarea-v3/index.js +1 -3
- package/dist/esm/v2/hooks/index.d.ts +0 -3
- package/dist/esm/v2/hooks/index.js +0 -2
- package/dist/esm/v2/index.js +13 -15
- package/dist/esm/v3/{OrCardCollection-110b3a0b.js → OrCardCollection-dbb3e839.js} +1 -1
- package/dist/esm/v3/{OrCheckbox-7144da06.js → OrCheckbox-3e139eac.js} +19 -36
- package/dist/esm/v3/{OrConfirm-1a38ed1b.js → OrConfirm-fee3c859.js} +13 -6
- package/dist/esm/v3/{OrInlineInput-a6b19dbe.js → OrInlineInput-507fc99c.js} +20 -37
- package/dist/esm/v3/{OrInlineTextarea-9eb60363.js → OrInlineTextarea-53a9e027.js} +20 -37
- package/dist/esm/v3/{OrInput-e07ec00c.js → OrInput-9c0426b9.js} +26 -37
- package/dist/esm/v3/{OrPagination-5e01a0a5.js → OrPagination-a703307d.js} +1 -1
- package/dist/esm/v3/{OrRadio-39d1905d.js → OrRadio-54b6d0de.js} +17 -34
- package/dist/esm/v3/{OrSearch-a60f67f0.js → OrSearch-9885d178.js} +1 -1
- package/dist/esm/v3/{OrSelect-2c70e384.js → OrSelect-dfa4885f.js} +2 -2
- package/dist/esm/v3/{OrSwitch-3e9a699d.js → OrSwitch-cca30aa0.js} +18 -34
- package/dist/esm/v3/{OrTabs-91618aab.js → OrTabs-d0ee6cef.js} +1 -1
- package/dist/esm/v3/{OrTextarea-fd6b9f31.js → OrTextarea-bb9ef3f2.js} +22 -42
- package/dist/esm/v3/components/index.js +13 -15
- package/dist/esm/v3/components/or-card-collection-v3/index.js +3 -5
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +2 -18
- package/dist/esm/v3/components/or-checkbox-v3/index.js +1 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +7 -9
- package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +6 -36
- package/dist/esm/v3/components/or-inline-input-v3/index.js +1 -3
- package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +6 -36
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +1 -3
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +8 -43
- package/dist/esm/v3/components/or-input-v3/index.js +1 -3
- package/dist/esm/v3/components/or-pagination-v3/index.js +1 -1
- package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +2 -18
- package/dist/esm/v3/components/or-radio-v3/index.js +1 -2
- package/dist/esm/v3/components/or-search-v3/index.js +2 -4
- package/dist/esm/v3/components/or-select-v3/index.js +3 -5
- package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +2 -18
- package/dist/esm/v3/components/or-switch-v3/index.js +1 -2
- package/dist/esm/v3/components/or-tabs-v3/index.js +1 -1
- package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +6 -45
- package/dist/esm/v3/components/or-textarea-v3/index.js +1 -3
- package/dist/esm/v3/hooks/index.d.ts +0 -3
- package/dist/esm/v3/hooks/index.js +0 -2
- package/dist/esm/v3/index.js +13 -15
- package/package.json +1 -1
- package/src/components/or-checkbox-v3/OrCheckbox.vue +10 -28
- package/src/components/or-confirm-v3/OrConfirm.vue +11 -10
- package/src/components/or-confirm-v3/styles.ts +13 -3
- package/src/components/or-inline-input-v3/OrInlineInput.vue +13 -32
- package/src/components/or-inline-textarea-v3/OrInlineTextarea.vue +13 -32
- package/src/components/or-input-v3/OrInput.stories3.ts +4 -4
- package/src/components/or-input-v3/OrInput.vue +19 -31
- package/src/components/or-pagination-v3/OrPagination.vue +1 -1
- package/src/components/or-radio-v3/OrRadio.vue +9 -27
- package/src/components/or-switch-v3/OrSwitch.vue +9 -27
- package/src/components/or-tabs-v3/OrTabs.vue +1 -1
- package/src/components/or-textarea-v3/OrTextarea.stories3.ts +4 -4
- package/src/components/or-textarea-v3/OrTextarea.vue +14 -36
- package/src/hooks/index.ts +0 -3
- package/dist/bundled/v2/hooks/useControlAttributes.d.ts +0 -8
- package/dist/bundled/v2/hooks/useIdAttribute.d.ts +0 -2
- package/dist/bundled/v2/hooks/useValidationAttributes.d.ts +0 -12
- package/dist/bundled/v2/useIdAttribute-cf61643f.js +0 -22
- package/dist/bundled/v2/useValidationAttributes-6df7bcf9.js +0 -17
- package/dist/bundled/v3/hooks/useControlAttributes.d.ts +0 -8
- package/dist/bundled/v3/hooks/useIdAttribute.d.ts +0 -2
- package/dist/bundled/v3/hooks/useValidationAttributes.d.ts +0 -12
- package/dist/bundled/v3/useIdAttribute-b2e42f31.js +0 -21
- package/dist/bundled/v3/useValidationAttributes-5428d8fa.js +0 -16
- package/dist/esm/v2/hooks/useControlAttributes.d.ts +0 -8
- package/dist/esm/v2/hooks/useIdAttribute.d.ts +0 -2
- package/dist/esm/v2/hooks/useValidationAttributes.d.ts +0 -12
- package/dist/esm/v2/useIdAttribute-859439f0.js +0 -21
- package/dist/esm/v2/useValidationAttributes-d1abbe34.js +0 -16
- package/dist/esm/v3/hooks/useControlAttributes.d.ts +0 -8
- package/dist/esm/v3/hooks/useIdAttribute.d.ts +0 -2
- package/dist/esm/v3/hooks/useValidationAttributes.d.ts +0 -12
- package/dist/esm/v3/useIdAttribute-859439f0.js +0 -21
- package/dist/esm/v3/useValidationAttributes-d1abbe34.js +0 -16
- package/src/hooks/useControlAttributes.ts +0 -19
- package/src/hooks/useIdAttribute.ts +0 -9
- package/src/hooks/useValidationAttributes.ts +0 -25
|
@@ -2,28 +2,14 @@ import { PropType } from 'vue-demi';
|
|
|
2
2
|
import { TextareaSize } from './props';
|
|
3
3
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
4
4
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
5
|
-
control: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
|
|
6
5
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
7
6
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
8
|
-
|
|
9
|
-
required: boolean | undefined;
|
|
10
|
-
minlength: number | undefined;
|
|
11
|
-
maxlength: number | undefined;
|
|
12
|
-
pattern: string | undefined;
|
|
13
|
-
min: number | undefined;
|
|
14
|
-
max: number | undefined;
|
|
15
|
-
step: number | undefined;
|
|
16
|
-
readonly: boolean | undefined;
|
|
17
|
-
disabled: boolean | undefined;
|
|
18
|
-
'force-state': string | undefined;
|
|
19
|
-
id: string | undefined;
|
|
20
|
-
};
|
|
7
|
+
controlId: import("@vue/composition-api").Ref<string>;
|
|
21
8
|
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
|
|
9
|
+
invalid: import("@vue/composition-api").ComputedRef<boolean>;
|
|
10
|
+
readonly: import("@vue/composition-api").ComputedRef<boolean>;
|
|
22
11
|
currentLength: import("@vue/composition-api").ComputedRef<number>;
|
|
23
12
|
maxLength: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
24
|
-
invalid: import("@vue/composition-api").ComputedRef<boolean>;
|
|
25
|
-
focus: () => void;
|
|
26
|
-
blur: () => void;
|
|
27
13
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
28
14
|
modelValue: {
|
|
29
15
|
type: StringConstructor;
|
|
@@ -57,10 +43,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
57
43
|
type: BooleanConstructor;
|
|
58
44
|
default: boolean;
|
|
59
45
|
};
|
|
60
|
-
readonly: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
default: boolean;
|
|
63
|
-
};
|
|
64
46
|
disabled: {
|
|
65
47
|
type: BooleanConstructor;
|
|
66
48
|
default: boolean;
|
|
@@ -98,10 +80,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
98
80
|
type: BooleanConstructor;
|
|
99
81
|
default: boolean;
|
|
100
82
|
};
|
|
101
|
-
readonly: {
|
|
102
|
-
type: BooleanConstructor;
|
|
103
|
-
default: boolean;
|
|
104
|
-
};
|
|
105
83
|
disabled: {
|
|
106
84
|
type: BooleanConstructor;
|
|
107
85
|
default: boolean;
|
|
@@ -115,34 +93,19 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
115
93
|
hint: string;
|
|
116
94
|
error: string;
|
|
117
95
|
required: boolean;
|
|
118
|
-
readonly: boolean;
|
|
119
96
|
disabled: boolean;
|
|
120
97
|
} & {} & {
|
|
121
98
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
122
99
|
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
123
100
|
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
124
|
-
control: import("@vue/composition-api").Ref<HTMLTextAreaElement | undefined>;
|
|
125
101
|
rootStyles: import("@vue/composition-api").ComputedRef<(string | undefined)[]>;
|
|
126
102
|
controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
127
|
-
|
|
128
|
-
required: boolean | undefined;
|
|
129
|
-
minlength: number | undefined;
|
|
130
|
-
maxlength: number | undefined;
|
|
131
|
-
pattern: string | undefined;
|
|
132
|
-
min: number | undefined;
|
|
133
|
-
max: number | undefined;
|
|
134
|
-
step: number | undefined;
|
|
135
|
-
readonly: boolean | undefined;
|
|
136
|
-
disabled: boolean | undefined;
|
|
137
|
-
'force-state': string | undefined;
|
|
138
|
-
id: string | undefined;
|
|
139
|
-
};
|
|
103
|
+
controlId: import("@vue/composition-api").Ref<string>;
|
|
140
104
|
proxyModelValue: import("@vue/composition-api").WritableComputedRef<string>;
|
|
105
|
+
invalid: import("@vue/composition-api").ComputedRef<boolean>;
|
|
106
|
+
readonly: import("@vue/composition-api").ComputedRef<boolean>;
|
|
141
107
|
currentLength: import("@vue/composition-api").ComputedRef<number>;
|
|
142
108
|
maxLength: import("@vue/composition-api").ComputedRef<number | undefined>;
|
|
143
|
-
invalid: import("@vue/composition-api").ComputedRef<boolean>;
|
|
144
|
-
focus: () => void;
|
|
145
|
-
blur: () => void;
|
|
146
109
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
147
110
|
modelValue: string;
|
|
148
111
|
value: string;
|
|
@@ -152,7 +115,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
152
115
|
hint: string;
|
|
153
116
|
error: string;
|
|
154
117
|
required: boolean;
|
|
155
|
-
readonly: boolean;
|
|
156
118
|
disabled: boolean;
|
|
157
119
|
} & {} & {
|
|
158
120
|
[x: string & `on${string}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -165,7 +127,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
165
127
|
hint: string;
|
|
166
128
|
error: string;
|
|
167
129
|
required: boolean;
|
|
168
|
-
readonly: boolean;
|
|
169
130
|
disabled: boolean;
|
|
170
131
|
}, true>);
|
|
171
132
|
export default _default;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { s as OrTextareaV3 } from '../../OrTextarea-
|
|
1
|
+
export { s as OrTextareaV3 } from '../../OrTextarea-bb9ef3f2.js';
|
|
2
2
|
export { a as TextareaSize } from '../../OrInputBox-6d1b6059.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import '../../useClassAttribute-47fdb016.js';
|
|
5
|
-
import '../../useIdAttribute-859439f0.js';
|
|
6
5
|
import '@vueuse/core';
|
|
7
|
-
import '../../useValidationAttributes-d1abbe34.js';
|
|
8
6
|
import '../../OrError-ec8c709d.js';
|
|
9
7
|
import 'vue';
|
|
10
8
|
import '../../OrHint-74bb732d.js';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export { useClassAttribute } from './useClassAttribute';
|
|
2
|
-
export { useControlAttributes } from './useControlAttributes';
|
|
3
2
|
export { useElevation } from './useElevation';
|
|
4
|
-
export { useIdAttribute } from './useIdAttribute';
|
|
5
3
|
export { useOverflow } from './useOverflow';
|
|
6
4
|
export { useResponsive } from './useResponsive';
|
|
7
5
|
export { default as useToggle } from './useToggle';
|
|
8
|
-
export { useValidationAttributes } from './useValidationAttributes';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export { u as useClassAttribute } from '../useClassAttribute-47fdb016.js';
|
|
2
|
-
export { u as useControlAttributes, a as useIdAttribute } from '../useIdAttribute-859439f0.js';
|
|
3
2
|
export { u as useElevation } from '../useElevation-31bfe1f6.js';
|
|
4
3
|
export { u as useOverflow } from '../useOverflow-af6161c8.js';
|
|
5
4
|
export { u as useResponsive } from '../useResponsive-a02e95b7.js';
|
|
6
5
|
export { u as useToggle } from '../useToggle-29e4d7c7.js';
|
|
7
|
-
export { u as useValidationAttributes } from '../useValidationAttributes-d1abbe34.js';
|
|
8
6
|
import 'vue-demi';
|
|
9
7
|
import '@vueuse/core';
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,17 +6,17 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-0fa67a0d.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-a5e326ef.js';
|
|
9
|
-
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-
|
|
9
|
+
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-dbb3e839.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-fd92f7c8.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
13
|
-
export { s as OrCheckboxV3 } from './OrCheckbox-
|
|
13
|
+
export { s as OrCheckboxV3 } from './OrCheckbox-3e139eac.js';
|
|
14
14
|
export { s as OrChip, a as OrChips } from './OrChips-9afba42f.js';
|
|
15
15
|
export { s as OrCode, O as OrCodeLanguages } from './OrCode-5ed69c23.js';
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-189cb097.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-f39bd784.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-fee3c859.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-f2e08564.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-98252eef.js';
|
|
@@ -31,11 +31,11 @@ export { s as OrIcon, O as OrIconColors, a as OrIconType } from './OrIcon-669503
|
|
|
31
31
|
export { I as IconButtonColor, s as OrIconButtonV3 } from './OrIconButton-1a89fbf9.js';
|
|
32
32
|
export { I as IconButtonSize, I as IconSize, a as IconVariant, s as OrIconV3 } from './OrIcon-b195169c.js';
|
|
33
33
|
export { I as InlineInputBoxSize, I as InlineInputSize, s as OrInlineInputBoxV3 } from './OrInlineInputBox-8049f95a.js';
|
|
34
|
-
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-
|
|
34
|
+
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-507fc99c.js';
|
|
35
35
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-1aa477b5.js';
|
|
36
|
-
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-
|
|
36
|
+
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-53a9e027.js';
|
|
37
37
|
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-6d1b6059.js';
|
|
38
|
-
export { I as InputType, s as OrInputV3 } from './OrInput-
|
|
38
|
+
export { I as InputType, s as OrInputV3 } from './OrInput-9c0426b9.js';
|
|
39
39
|
export { a as OrInput, b as OrNumberInput, c as OrPassword, d as OrSearch, s as OrTextarea } from './OrSearch-7cb2c91c.js';
|
|
40
40
|
export { s as OrLabel } from './OrLabel-876f8729.js';
|
|
41
41
|
export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-bdaec602.js';
|
|
@@ -54,16 +54,16 @@ export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotificatio
|
|
|
54
54
|
export { s as OrOverflowMenu } from './OrOverflowMenu-e82cbcbe.js';
|
|
55
55
|
export { s as OrOverlay } from './OrOverlay-451dce49.js';
|
|
56
56
|
export { s as OrOverlayV3 } from './OrOverlay-738a44d5.js';
|
|
57
|
-
export { s as OrPaginationV3 } from './OrPagination-
|
|
57
|
+
export { s as OrPaginationV3 } from './OrPagination-a703307d.js';
|
|
58
58
|
export { s as OrProgress, O as OrProgressColors, a as OrProgressTypes } from './OrProgress-d0d52c86.js';
|
|
59
59
|
export { s as OrProgressV3, P as ProgressColor, a as ProgressType } from './OrProgress-407002e0.js';
|
|
60
60
|
export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
61
61
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
62
|
-
export { s as OrRadioV3 } from './OrRadio-
|
|
63
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
62
|
+
export { s as OrRadioV3 } from './OrRadio-54b6d0de.js';
|
|
63
|
+
export { s as OrSearchV3 } from './OrSearch-9885d178.js';
|
|
64
64
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-171cad78.js';
|
|
65
65
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
66
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
66
|
+
export { s as OrSelectV3 } from './OrSelect-dfa4885f.js';
|
|
67
67
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
68
68
|
export { O as OrSidebarPlacement, s as OrSidebarV3 } from './OrSidebar-a62972f5.js';
|
|
69
69
|
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-2b1610ce.js';
|
|
@@ -72,18 +72,18 @@ export { s as OrSlider } from './OrSlider-87e2da8c.js';
|
|
|
72
72
|
export { s as OrSortHeaderV3 } from './OrSortHeader-fe1a9cf8.js';
|
|
73
73
|
export { s as OrStepper } from './OrStepper-f19b4eac.js';
|
|
74
74
|
export { s as OrSwitch } from './OrSwitch-c333ee32.js';
|
|
75
|
-
export { s as OrSwitchV3 } from './OrSwitch-
|
|
75
|
+
export { s as OrSwitchV3 } from './OrSwitch-cca30aa0.js';
|
|
76
76
|
export { s as OrTab } from './OrTab-bc98be02.js';
|
|
77
77
|
export { s as OrTabHeaderItem } from './OrTabHeaderItem-d668cc59.js';
|
|
78
78
|
export { s as OrTabV3 } from './OrTab-c131cf60.js';
|
|
79
79
|
export { s as OrTabs } from './OrTabs-d3812c11.js';
|
|
80
|
-
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-
|
|
80
|
+
export { s as OrTabsV3, T as TabsVariant } from './OrTabs-d0ee6cef.js';
|
|
81
81
|
export { s as OrTag } from './OrTag-1b5e43fa.js';
|
|
82
82
|
export { s as OrTagV3, a as TagColor, T as TagVariant } from './OrTag-efa7578f.js';
|
|
83
83
|
export { s as OrTeleport } from './OrTeleportVue3-ad639f12.js';
|
|
84
84
|
export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
|
|
85
85
|
export { s as OrTextV3 } from './OrText-ecb46923.js';
|
|
86
|
-
export { s as OrTextareaV3 } from './OrTextarea-
|
|
86
|
+
export { s as OrTextareaV3 } from './OrTextarea-bb9ef3f2.js';
|
|
87
87
|
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-2f33e9c3.js';
|
|
88
88
|
export { s as OrToast, a as OrToastContainer } from './OrToastContainer-40c4c1c8.js';
|
|
89
89
|
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
@@ -93,12 +93,10 @@ export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-78cd7f6b.js';
|
|
|
93
93
|
export { s as OrTooltipV3 } from './OrTooltip-50d27b4f.js';
|
|
94
94
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
95
95
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
96
|
-
export { u as useControlAttributes, a as useIdAttribute } from './useIdAttribute-859439f0.js';
|
|
97
96
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
|
98
97
|
export { u as useOverflow } from './useOverflow-af6161c8.js';
|
|
99
98
|
export { u as useResponsive } from './useResponsive-a02e95b7.js';
|
|
100
99
|
export { u as useToggle } from './useToggle-29e4d7c7.js';
|
|
101
|
-
export { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
|
|
102
100
|
import { R as RX_ABBREVIATION_FROM_STRING } from './color-1f348774.js';
|
|
103
101
|
import 'vue-demi';
|
|
104
102
|
import 'lodash';
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
-
v-bind="$attrs"
|
|
5
4
|
:class="rootStyles"
|
|
6
5
|
>
|
|
7
6
|
<input
|
|
8
|
-
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
:id="controlId"
|
|
9
9
|
v-model="proxyModelValue"
|
|
10
|
-
v-bind="controlAttributes"
|
|
11
10
|
:class="controlStyles"
|
|
12
|
-
|
|
11
|
+
type="checkbox"
|
|
13
12
|
:value="inputValue"
|
|
14
13
|
:indeterminate="indeterminate"
|
|
15
14
|
:required="required"
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
|
|
21
20
|
<template v-if="$slots.default || label">
|
|
22
21
|
<OrLabel
|
|
23
|
-
:control-id="
|
|
22
|
+
:control-id="controlId"
|
|
24
23
|
:variant="labelVariant"
|
|
25
24
|
:required="required"
|
|
26
25
|
:disabled="disabled"
|
|
@@ -36,8 +35,8 @@
|
|
|
36
35
|
</template>
|
|
37
36
|
|
|
38
37
|
<script lang="ts">
|
|
39
|
-
import { computed, defineComponent,
|
|
40
|
-
import { useClassAttribute
|
|
38
|
+
import { computed, defineComponent, getCurrentInstance, PropType, ref } from 'vue-demi';
|
|
39
|
+
import { useClassAttribute } from '../../hooks';
|
|
41
40
|
import { LabelVariant, OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
42
41
|
import { CheckboxControl, CheckboxControlHandle, CheckboxRoot } from './styles';
|
|
43
42
|
|
|
@@ -102,15 +101,13 @@ export default defineComponent({
|
|
|
102
101
|
|
|
103
102
|
expose: [
|
|
104
103
|
'root',
|
|
105
|
-
|
|
106
|
-
'focus',
|
|
107
|
-
'blur',
|
|
108
104
|
],
|
|
109
105
|
|
|
110
106
|
setup(props, context) {
|
|
107
|
+
const currentInstance = getCurrentInstance()!;
|
|
108
|
+
|
|
111
109
|
// Refs
|
|
112
110
|
const root = ref<HTMLElement>();
|
|
113
|
-
const control = ref<HTMLInputElement>();
|
|
114
111
|
|
|
115
112
|
// Styles
|
|
116
113
|
const classAttribute = useClassAttribute();
|
|
@@ -127,10 +124,7 @@ export default defineComponent({
|
|
|
127
124
|
]);
|
|
128
125
|
|
|
129
126
|
// State
|
|
130
|
-
const
|
|
131
|
-
id: useIdAttribute(),
|
|
132
|
-
...useControlAttributes(),
|
|
133
|
-
});
|
|
127
|
+
const controlId = ref(context.attrs.id as string ?? currentInstance.uid.toString());
|
|
134
128
|
|
|
135
129
|
const proxyModelValue = computed({
|
|
136
130
|
get: () => {
|
|
@@ -143,24 +137,12 @@ export default defineComponent({
|
|
|
143
137
|
},
|
|
144
138
|
});
|
|
145
139
|
|
|
146
|
-
// Methods
|
|
147
|
-
function focus(): void {
|
|
148
|
-
control.value?.focus();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function blur(): void {
|
|
152
|
-
control.value?.blur();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
140
|
return {
|
|
156
141
|
root,
|
|
157
|
-
control,
|
|
158
142
|
rootStyles,
|
|
159
143
|
controlStyles,
|
|
160
|
-
|
|
144
|
+
controlId,
|
|
161
145
|
proxyModelValue,
|
|
162
|
-
focus,
|
|
163
|
-
blur,
|
|
164
146
|
};
|
|
165
147
|
},
|
|
166
148
|
});
|
|
@@ -65,20 +65,17 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
<script lang="ts">
|
|
68
|
+
import { onClickOutside, useMagicKeys, whenever } from '@vueuse/core';
|
|
69
|
+
import { logicAnd } from '@vueuse/math';
|
|
68
70
|
import { computed, defineComponent, PropType, ref, watch } from 'vue-demi';
|
|
69
|
-
import { OrButtonV3 as OrButton
|
|
70
|
-
import { OrOverlayV3 as OrOverlay } from '../or-overlay-v3';
|
|
71
|
+
import { ButtonColor, OrButtonV3 as OrButton } from '../or-button-v3';
|
|
71
72
|
import { OrInputV3 as OrInput } from '../or-input-v3';
|
|
72
|
-
import {
|
|
73
|
-
import { logicAnd } from '@vueuse/math';
|
|
73
|
+
import { OrOverlayV3 as OrOverlay } from '../or-overlay-v3';
|
|
74
74
|
import { ConfirmType } from './props';
|
|
75
75
|
import {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
ConfirmInput,
|
|
80
|
-
ConfirmRoot,
|
|
81
|
-
ConfirmFooterButtons,
|
|
76
|
+
ConfirmFooter, ConfirmFooterButtons, ConfirmFooterTypes, ConfirmHeader,
|
|
77
|
+
ConfirmInput,
|
|
78
|
+
ConfirmRoot
|
|
82
79
|
} from './styles';
|
|
83
80
|
|
|
84
81
|
export default defineComponent({
|
|
@@ -261,6 +258,10 @@ export default defineComponent({
|
|
|
261
258
|
...ConfirmFooterButtons,
|
|
262
259
|
]);
|
|
263
260
|
|
|
261
|
+
// #region Click Outside
|
|
262
|
+
onClickOutside(root, close);
|
|
263
|
+
// #endregion
|
|
264
|
+
|
|
264
265
|
return {
|
|
265
266
|
root,
|
|
266
267
|
confirmationInput,
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { ConfirmType } from './props';
|
|
2
2
|
|
|
3
3
|
export const ConfirmRoot: string[] = [
|
|
4
|
+
// Position
|
|
5
|
+
'fixed md:static',
|
|
6
|
+
|
|
7
|
+
'left-none',
|
|
8
|
+
'right-none',
|
|
9
|
+
'bottom-none',
|
|
10
|
+
|
|
4
11
|
// Layout
|
|
5
12
|
'layout-column',
|
|
6
13
|
|
|
7
14
|
// Box
|
|
8
|
-
'w-[320px]',
|
|
15
|
+
'w-full md:w-[320px]',
|
|
9
16
|
|
|
10
17
|
// Shape
|
|
11
|
-
'rounded-md',
|
|
18
|
+
'rounded-0 md:rounded-md',
|
|
12
19
|
|
|
13
20
|
// Spacing
|
|
14
21
|
'px-lg',
|
|
@@ -71,6 +78,9 @@ export const ConfirmFooterTypes: Record<ConfirmType, string[]> = {
|
|
|
71
78
|
};
|
|
72
79
|
|
|
73
80
|
export const ConfirmFooterButtons: string[] = [
|
|
81
|
+
// Layout
|
|
82
|
+
'grow',
|
|
83
|
+
|
|
74
84
|
// Box
|
|
75
|
-
'w-[128px]',
|
|
85
|
+
'w-auto md:w-[128px]',
|
|
76
86
|
];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
-
v-bind="$attrs"
|
|
5
4
|
:class="rootStyles"
|
|
6
5
|
>
|
|
7
6
|
<div :class="['layout-row', 'gap-sm+']">
|
|
@@ -10,9 +9,9 @@
|
|
|
10
9
|
:invalid="invalid"
|
|
11
10
|
>
|
|
12
11
|
<input
|
|
13
|
-
|
|
12
|
+
:id="controlId"
|
|
14
13
|
v-model="draftModelValue"
|
|
15
|
-
v-bind="
|
|
14
|
+
v-bind="$attrs"
|
|
16
15
|
:class="controlStyles"
|
|
17
16
|
:type="type"
|
|
18
17
|
:placeholder="placeholder"
|
|
@@ -72,8 +71,8 @@
|
|
|
72
71
|
</template>
|
|
73
72
|
|
|
74
73
|
<script lang="ts">
|
|
75
|
-
import { computed, defineComponent,
|
|
76
|
-
import { useClassAttribute
|
|
74
|
+
import { computed, defineComponent, getCurrentInstance, PropType, ref, watch } from 'vue-demi';
|
|
75
|
+
import { useClassAttribute } from '../../hooks';
|
|
77
76
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
78
77
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
79
78
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -147,15 +146,13 @@ export default defineComponent({
|
|
|
147
146
|
|
|
148
147
|
expose: [
|
|
149
148
|
'root',
|
|
150
|
-
|
|
151
|
-
'focus',
|
|
152
|
-
'blur',
|
|
153
149
|
],
|
|
154
150
|
|
|
155
151
|
setup(props, context) {
|
|
152
|
+
const currentInstance = getCurrentInstance()!;
|
|
153
|
+
|
|
156
154
|
// Refs
|
|
157
155
|
const root = ref<HTMLElement>();
|
|
158
|
-
const control = ref<HTMLInputElement>();
|
|
159
156
|
|
|
160
157
|
// Styles
|
|
161
158
|
const classAttribute = useClassAttribute();
|
|
@@ -176,11 +173,7 @@ export default defineComponent({
|
|
|
176
173
|
]);
|
|
177
174
|
|
|
178
175
|
// State
|
|
179
|
-
const
|
|
180
|
-
id: useIdAttribute(),
|
|
181
|
-
...useControlAttributes(),
|
|
182
|
-
...useValidationAttributes(),
|
|
183
|
-
});
|
|
176
|
+
const controlId = ref(context.attrs.id as string ?? currentInstance.uid.toString());
|
|
184
177
|
|
|
185
178
|
const proxyModelValue = computed({
|
|
186
179
|
get: () => {
|
|
@@ -195,12 +188,11 @@ export default defineComponent({
|
|
|
195
188
|
|
|
196
189
|
const draftModelValue = ref<string | number>('');
|
|
197
190
|
|
|
198
|
-
const
|
|
199
|
-
const maxLength = computed(() => controlAttributes.maxlength);
|
|
200
|
-
|
|
191
|
+
const activated = ref(false);
|
|
201
192
|
const invalid = computed(() => !!props.error);
|
|
202
193
|
|
|
203
|
-
const
|
|
194
|
+
const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
|
|
195
|
+
const maxLength = computed(() => context.attrs.maxlength as number | undefined);
|
|
204
196
|
|
|
205
197
|
// Handlers
|
|
206
198
|
function onFocus(event: Event): void {
|
|
@@ -218,14 +210,6 @@ export default defineComponent({
|
|
|
218
210
|
}
|
|
219
211
|
|
|
220
212
|
// Methods
|
|
221
|
-
function focus(): void {
|
|
222
|
-
control.value?.focus();
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function blur(): void {
|
|
226
|
-
control.value?.blur();
|
|
227
|
-
}
|
|
228
|
-
|
|
229
213
|
function apply(): void {
|
|
230
214
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
231
215
|
proxyModelValue.value = draftModelValue.value;
|
|
@@ -249,21 +233,18 @@ export default defineComponent({
|
|
|
249
233
|
|
|
250
234
|
return {
|
|
251
235
|
root,
|
|
252
|
-
control,
|
|
253
236
|
rootStyles,
|
|
254
237
|
controlStyles,
|
|
255
238
|
actionStyles,
|
|
256
|
-
|
|
239
|
+
controlId,
|
|
257
240
|
proxyModelValue,
|
|
258
241
|
draftModelValue,
|
|
242
|
+
activated,
|
|
243
|
+
invalid,
|
|
259
244
|
currentLength,
|
|
260
245
|
maxLength,
|
|
261
|
-
invalid,
|
|
262
|
-
activated,
|
|
263
246
|
onFocus,
|
|
264
247
|
onBlur,
|
|
265
|
-
focus,
|
|
266
|
-
blur,
|
|
267
248
|
apply,
|
|
268
249
|
reset,
|
|
269
250
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
|
-
v-bind="$attrs"
|
|
5
4
|
:class="rootStyles"
|
|
6
5
|
>
|
|
7
6
|
<div :class="['layout-row', 'gap-sm+']">
|
|
@@ -10,9 +9,9 @@
|
|
|
10
9
|
:invalid="invalid"
|
|
11
10
|
>
|
|
12
11
|
<textarea
|
|
13
|
-
|
|
12
|
+
:id="controlId"
|
|
14
13
|
v-model="draftModelValue"
|
|
15
|
-
v-bind="
|
|
14
|
+
v-bind="$attrs"
|
|
16
15
|
:class="controlStyles"
|
|
17
16
|
:placeholder="placeholder"
|
|
18
17
|
:activated="activated ? '' : null"
|
|
@@ -71,8 +70,8 @@
|
|
|
71
70
|
</template>
|
|
72
71
|
|
|
73
72
|
<script lang="ts">
|
|
74
|
-
import { computed, defineComponent,
|
|
75
|
-
import { useClassAttribute
|
|
73
|
+
import { computed, defineComponent, getCurrentInstance, ref, watch } from 'vue-demi';
|
|
74
|
+
import { useClassAttribute } from '../../hooks';
|
|
76
75
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
77
76
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
78
77
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
@@ -135,15 +134,13 @@ export default defineComponent({
|
|
|
135
134
|
|
|
136
135
|
expose: [
|
|
137
136
|
'root',
|
|
138
|
-
|
|
139
|
-
'focus',
|
|
140
|
-
'blur',
|
|
141
137
|
],
|
|
142
138
|
|
|
143
139
|
setup(props, context) {
|
|
140
|
+
const currentInstance = getCurrentInstance()!;
|
|
141
|
+
|
|
144
142
|
// Refs
|
|
145
143
|
const root = ref<HTMLElement>();
|
|
146
|
-
const control = ref<HTMLTextAreaElement>();
|
|
147
144
|
|
|
148
145
|
// Styles
|
|
149
146
|
const classAttribute = useClassAttribute();
|
|
@@ -163,11 +160,7 @@ export default defineComponent({
|
|
|
163
160
|
]);
|
|
164
161
|
|
|
165
162
|
// State
|
|
166
|
-
const
|
|
167
|
-
id: useIdAttribute(),
|
|
168
|
-
...useControlAttributes(),
|
|
169
|
-
...useValidationAttributes(),
|
|
170
|
-
});
|
|
163
|
+
const controlId = ref(context.attrs.id as string ?? currentInstance.uid.toString());
|
|
171
164
|
|
|
172
165
|
const proxyModelValue = computed({
|
|
173
166
|
get: () => {
|
|
@@ -182,12 +175,11 @@ export default defineComponent({
|
|
|
182
175
|
|
|
183
176
|
const draftModelValue = ref<string>('');
|
|
184
177
|
|
|
185
|
-
const
|
|
186
|
-
const maxLength = computed(() => controlAttributes.maxlength);
|
|
187
|
-
|
|
178
|
+
const activated = ref(false);
|
|
188
179
|
const invalid = computed(() => !!props.error);
|
|
189
180
|
|
|
190
|
-
const
|
|
181
|
+
const currentLength = computed(() => draftModelValue.value?.toString().length ?? 0);
|
|
182
|
+
const maxLength = computed(() => context.attrs.maxlength as number | undefined);
|
|
191
183
|
|
|
192
184
|
// Handlers
|
|
193
185
|
function onFocus(event: Event): void {
|
|
@@ -205,14 +197,6 @@ export default defineComponent({
|
|
|
205
197
|
}
|
|
206
198
|
|
|
207
199
|
// Methods
|
|
208
|
-
function focus(): void {
|
|
209
|
-
control.value?.focus();
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function blur(): void {
|
|
213
|
-
control.value?.blur();
|
|
214
|
-
}
|
|
215
|
-
|
|
216
200
|
function apply(): void {
|
|
217
201
|
if (draftModelValue.value !== proxyModelValue.value) {
|
|
218
202
|
proxyModelValue.value = draftModelValue.value;
|
|
@@ -236,21 +220,18 @@ export default defineComponent({
|
|
|
236
220
|
|
|
237
221
|
return {
|
|
238
222
|
root,
|
|
239
|
-
control,
|
|
240
223
|
rootStyles,
|
|
241
224
|
controlStyles,
|
|
242
225
|
actionStyles,
|
|
243
|
-
|
|
226
|
+
controlId,
|
|
244
227
|
proxyModelValue,
|
|
245
228
|
draftModelValue,
|
|
229
|
+
activated,
|
|
230
|
+
invalid,
|
|
246
231
|
currentLength,
|
|
247
232
|
maxLength,
|
|
248
|
-
invalid,
|
|
249
|
-
activated,
|
|
250
233
|
onFocus,
|
|
251
234
|
onBlur,
|
|
252
|
-
focus,
|
|
253
|
-
blur,
|
|
254
235
|
apply,
|
|
255
236
|
reset,
|
|
256
237
|
};
|
|
@@ -17,6 +17,10 @@ export default {
|
|
|
17
17
|
control: { type: 'text' },
|
|
18
18
|
},
|
|
19
19
|
|
|
20
|
+
readonly: {
|
|
21
|
+
control: { type: 'boolean' },
|
|
22
|
+
},
|
|
23
|
+
|
|
20
24
|
maxlength: {
|
|
21
25
|
control: { type: 'number' },
|
|
22
26
|
},
|
|
@@ -70,10 +74,6 @@ export default {
|
|
|
70
74
|
control: { type: 'boolean' },
|
|
71
75
|
},
|
|
72
76
|
|
|
73
|
-
readonly: {
|
|
74
|
-
control: { type: 'boolean' },
|
|
75
|
-
},
|
|
76
|
-
|
|
77
77
|
disabled: {
|
|
78
78
|
control: { type: 'boolean' },
|
|
79
79
|
},
|