@speckle/ui-components 2.17.4 → 2.17.6
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/components/form/Radio.vue.d.ts +211 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +1396 -1228
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import type { RuleExpression } from 'vee-validate';
|
|
2
|
+
import type { PropType, ConcreteComponent } from 'vue';
|
|
3
|
+
import type { Optional } from '@speckle/shared';
|
|
4
|
+
/**
|
|
5
|
+
* Troubleshooting:
|
|
6
|
+
* - If clicking on the radio doesn't do anything, check if any of its ancestor elements
|
|
7
|
+
* have a @click.prevent on them anywhere.
|
|
8
|
+
* - If you're not using the radio in a group, it's suggested that you set :value="true",
|
|
9
|
+
* so that a v-model attached to the radio will be either 'true' or 'undefined' depending on the
|
|
10
|
+
* checked state
|
|
11
|
+
*/
|
|
12
|
+
type ValueType = Optional<string | true> | string[];
|
|
13
|
+
declare const _default: import("vue").DefineComponent<{
|
|
14
|
+
/**
|
|
15
|
+
* Input name/id. In a radio group, all radios must have the same name and different values.
|
|
16
|
+
*/
|
|
17
|
+
name: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Whether the input is disabled
|
|
23
|
+
*/
|
|
24
|
+
disabled: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Set label text
|
|
30
|
+
*/
|
|
31
|
+
label: {
|
|
32
|
+
type: PropType<Optional<string>>;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Help text
|
|
37
|
+
*/
|
|
38
|
+
description: {
|
|
39
|
+
type: PropType<Optional<string>>;
|
|
40
|
+
default: undefined;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Whether to inline the help description
|
|
44
|
+
*/
|
|
45
|
+
inlineDescription: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Optional Icon
|
|
51
|
+
*/
|
|
52
|
+
icon: {
|
|
53
|
+
type: PropType<ConcreteComponent>;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* vee-validate validation rules
|
|
58
|
+
*/
|
|
59
|
+
rules: {
|
|
60
|
+
type: PropType<RuleExpression<ValueType>>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* vee-validate validation() on component mount
|
|
65
|
+
*/
|
|
66
|
+
validateOnMount: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Whether to show the red "required" asterisk
|
|
72
|
+
*/
|
|
73
|
+
showRequired: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Radio group's value
|
|
79
|
+
*/
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: PropType<false | ValueType>;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Radio's own value. If it is checked, modelValue will include this value (amongst any other checked values from the same group).
|
|
86
|
+
* If not set will default to 'name' value.
|
|
87
|
+
*/
|
|
88
|
+
value: {
|
|
89
|
+
type: PropType<Optional<string | true>>;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* HTML ID to use, must be globally unique. If not specified, a random ID will be generated. One is necessary to properly associate the label and radio.
|
|
94
|
+
*/
|
|
95
|
+
id: {
|
|
96
|
+
type: PropType<Optional<string>>;
|
|
97
|
+
default: undefined;
|
|
98
|
+
};
|
|
99
|
+
hideLabel: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
104
|
+
"update:modelValue": (val: ValueType) => void;
|
|
105
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
106
|
+
/**
|
|
107
|
+
* Input name/id. In a radio group, all radios must have the same name and different values.
|
|
108
|
+
*/
|
|
109
|
+
name: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
required: true;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Whether the input is disabled
|
|
115
|
+
*/
|
|
116
|
+
disabled: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
default: boolean;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Set label text
|
|
122
|
+
*/
|
|
123
|
+
label: {
|
|
124
|
+
type: PropType<Optional<string>>;
|
|
125
|
+
default: undefined;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Help text
|
|
129
|
+
*/
|
|
130
|
+
description: {
|
|
131
|
+
type: PropType<Optional<string>>;
|
|
132
|
+
default: undefined;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Whether to inline the help description
|
|
136
|
+
*/
|
|
137
|
+
inlineDescription: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
default: boolean;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Optional Icon
|
|
143
|
+
*/
|
|
144
|
+
icon: {
|
|
145
|
+
type: PropType<ConcreteComponent>;
|
|
146
|
+
default: undefined;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* vee-validate validation rules
|
|
150
|
+
*/
|
|
151
|
+
rules: {
|
|
152
|
+
type: PropType<RuleExpression<ValueType>>;
|
|
153
|
+
default: undefined;
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* vee-validate validation() on component mount
|
|
157
|
+
*/
|
|
158
|
+
validateOnMount: {
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
default: boolean;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Whether to show the red "required" asterisk
|
|
164
|
+
*/
|
|
165
|
+
showRequired: {
|
|
166
|
+
type: BooleanConstructor;
|
|
167
|
+
default: boolean;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Radio group's value
|
|
171
|
+
*/
|
|
172
|
+
modelValue: {
|
|
173
|
+
type: PropType<false | ValueType>;
|
|
174
|
+
default: undefined;
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Radio's own value. If it is checked, modelValue will include this value (amongst any other checked values from the same group).
|
|
178
|
+
* If not set will default to 'name' value.
|
|
179
|
+
*/
|
|
180
|
+
value: {
|
|
181
|
+
type: PropType<Optional<string | true>>;
|
|
182
|
+
default: boolean;
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* HTML ID to use, must be globally unique. If not specified, a random ID will be generated. One is necessary to properly associate the label and radio.
|
|
186
|
+
*/
|
|
187
|
+
id: {
|
|
188
|
+
type: PropType<Optional<string>>;
|
|
189
|
+
default: undefined;
|
|
190
|
+
};
|
|
191
|
+
hideLabel: {
|
|
192
|
+
type: BooleanConstructor;
|
|
193
|
+
default: boolean;
|
|
194
|
+
};
|
|
195
|
+
}>> & {
|
|
196
|
+
"onUpdate:modelValue"?: ((val: ValueType) => any) | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
disabled: boolean;
|
|
199
|
+
id: Optional<string>;
|
|
200
|
+
label: Optional<string>;
|
|
201
|
+
value: Optional<string | true>;
|
|
202
|
+
description: Optional<string>;
|
|
203
|
+
icon: ConcreteComponent;
|
|
204
|
+
modelValue: false | ValueType;
|
|
205
|
+
inlineDescription: boolean;
|
|
206
|
+
rules: RuleExpression<ValueType>;
|
|
207
|
+
validateOnMount: boolean;
|
|
208
|
+
showRequired: boolean;
|
|
209
|
+
hideLabel: boolean;
|
|
210
|
+
}, {}>;
|
|
211
|
+
export default _default;
|