@destyler/radio 0.0.3 → 0.0.5

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.
@@ -1,85 +1,137 @@
1
- export { DestylerRadioGroupIndicator, DestylerRadioGroupIndicatorProps, DestylerRadioGroupItem, DestylerRadioGroupItemProps, DestylerRadioGroupRoot, DestylerRadioGroupRootProps } from './index.mjs';
1
+ export { f as RadioGroupIndicator, h as RadioGroupIndicatorProps, c as RadioGroupItem, e as RadioGroupItemProps, R as RadioGroupRoot, b as RadioGroupRootProps, g as radioGroupIndicatorProps, d as radioGroupItemProps, a as radioGroupRootEmits, r as radioGroupRootProps } from './shared/radio.54693474.mjs';
2
2
  import * as vue from 'vue';
3
- import { PropType, Component } from 'vue';
4
- import { AsTag } from '@destyler/primitive';
3
+ import { PropType } from 'vue';
4
+ import * as _destyler_primitive from '@destyler/primitive';
5
5
  import { ExtractPublicPropTypes } from '@destyler/shared';
6
6
 
7
- declare const destylerRadioProps: {
7
+ declare const radioProps: {
8
+ /**
9
+ * @default button
10
+ */
8
11
  readonly as: {
9
- readonly type: PropType<AsTag | Component>;
10
- readonly required: false;
11
12
  readonly default: "button";
12
- };
13
- readonly asChild: {
14
- readonly type: PropType<boolean>;
13
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
15
14
  readonly required: false;
16
- readonly default: false;
17
15
  };
16
+ /**
17
+ * The name of the input fields in the radio (Useful for form submission).
18
+ */
18
19
  readonly id: {
19
20
  readonly type: PropType<string>;
20
21
  readonly required: false;
21
22
  };
23
+ /**
24
+ * The value given as data when submitted with a `name`.
25
+ */
22
26
  readonly value: {
23
27
  readonly type: PropType<string>;
24
28
  readonly required: false;
25
29
  };
30
+ /**
31
+ * When `true`, prevents the user from interacting with the radio item.
32
+ */
26
33
  readonly disabled: {
27
34
  readonly type: PropType<boolean>;
28
35
  readonly required: false;
29
36
  readonly default: false;
30
37
  };
38
+ /**
39
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
40
+ */
31
41
  readonly required: {
32
42
  readonly type: PropType<boolean>;
33
43
  readonly required: false;
34
44
  };
45
+ /**
46
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
47
+ *
48
+ * @default undefined
49
+ */
35
50
  readonly checked: {
36
51
  readonly type: PropType<boolean>;
37
52
  readonly required: false;
38
53
  readonly default: undefined;
39
54
  };
55
+ /**
56
+ * The name of the input fields in the radio (Useful for form submission).
57
+ */
40
58
  readonly name: {
41
59
  readonly type: PropType<string>;
42
60
  readonly required: false;
43
61
  };
44
- };
45
- type DestylerRadioProps = ExtractPublicPropTypes<typeof destylerRadioProps>;
46
- declare const DestylerRadio: vue.DefineComponent<{
47
- readonly as: {
48
- readonly type: PropType<AsTag | Component>;
49
- readonly required: false;
50
- readonly default: "button";
51
- };
52
62
  readonly asChild: {
53
63
  readonly type: PropType<boolean>;
54
64
  readonly required: false;
55
65
  readonly default: false;
56
66
  };
67
+ };
68
+ type RadioProps = ExtractPublicPropTypes<typeof radioProps>;
69
+ declare const radioEmits: {
70
+ /**
71
+ * Event handler called when the radio item is checked.
72
+ */
73
+ 'update:checked': (_value: boolean) => boolean;
74
+ };
75
+ declare const Radio: vue.DefineComponent<{
76
+ /**
77
+ * @default button
78
+ */
79
+ readonly as: {
80
+ readonly default: "button";
81
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
82
+ readonly required: false;
83
+ };
84
+ /**
85
+ * The name of the input fields in the radio (Useful for form submission).
86
+ */
57
87
  readonly id: {
58
88
  readonly type: PropType<string>;
59
89
  readonly required: false;
60
90
  };
91
+ /**
92
+ * The value given as data when submitted with a `name`.
93
+ */
61
94
  readonly value: {
62
95
  readonly type: PropType<string>;
63
96
  readonly required: false;
64
97
  };
98
+ /**
99
+ * When `true`, prevents the user from interacting with the radio item.
100
+ */
65
101
  readonly disabled: {
66
102
  readonly type: PropType<boolean>;
67
103
  readonly required: false;
68
104
  readonly default: false;
69
105
  };
106
+ /**
107
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
108
+ */
70
109
  readonly required: {
71
110
  readonly type: PropType<boolean>;
72
111
  readonly required: false;
73
112
  };
113
+ /**
114
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
115
+ *
116
+ * @default undefined
117
+ */
74
118
  readonly checked: {
75
119
  readonly type: PropType<boolean>;
76
120
  readonly required: false;
77
121
  readonly default: undefined;
78
122
  };
123
+ /**
124
+ * The name of the input fields in the radio (Useful for form submission).
125
+ */
79
126
  readonly name: {
80
127
  readonly type: PropType<string>;
81
128
  readonly required: false;
82
129
  };
130
+ readonly asChild: {
131
+ readonly type: PropType<boolean>;
132
+ readonly required: false;
133
+ readonly default: false;
134
+ };
83
135
  }, {
84
136
  forwardRef: (ref: Element | vue.ComponentPublicInstance | null) => void;
85
137
  checkedRef: vue.WritableComputedRef<boolean | undefined>;
@@ -87,50 +139,78 @@ declare const DestylerRadio: vue.DefineComponent<{
87
139
  value: vue.Ref<string | undefined>;
88
140
  isFormControl: vue.ComputedRef<boolean>;
89
141
  handleClick: (event: MouseEvent) => void;
90
- }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:checked"[], "update:checked", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
142
+ }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
143
+ /**
144
+ * Event handler called when the radio item is checked.
145
+ */
146
+ 'update:checked': (_value: boolean) => boolean;
147
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
148
+ /**
149
+ * @default button
150
+ */
91
151
  readonly as: {
92
- readonly type: PropType<AsTag | Component>;
93
- readonly required: false;
94
152
  readonly default: "button";
95
- };
96
- readonly asChild: {
97
- readonly type: PropType<boolean>;
153
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
98
154
  readonly required: false;
99
- readonly default: false;
100
155
  };
156
+ /**
157
+ * The name of the input fields in the radio (Useful for form submission).
158
+ */
101
159
  readonly id: {
102
160
  readonly type: PropType<string>;
103
161
  readonly required: false;
104
162
  };
163
+ /**
164
+ * The value given as data when submitted with a `name`.
165
+ */
105
166
  readonly value: {
106
167
  readonly type: PropType<string>;
107
168
  readonly required: false;
108
169
  };
170
+ /**
171
+ * When `true`, prevents the user from interacting with the radio item.
172
+ */
109
173
  readonly disabled: {
110
174
  readonly type: PropType<boolean>;
111
175
  readonly required: false;
112
176
  readonly default: false;
113
177
  };
178
+ /**
179
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
180
+ */
114
181
  readonly required: {
115
182
  readonly type: PropType<boolean>;
116
183
  readonly required: false;
117
184
  };
185
+ /**
186
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
187
+ *
188
+ * @default undefined
189
+ */
118
190
  readonly checked: {
119
191
  readonly type: PropType<boolean>;
120
192
  readonly required: false;
121
193
  readonly default: undefined;
122
194
  };
195
+ /**
196
+ * The name of the input fields in the radio (Useful for form submission).
197
+ */
123
198
  readonly name: {
124
199
  readonly type: PropType<string>;
125
200
  readonly required: false;
126
201
  };
202
+ readonly asChild: {
203
+ readonly type: PropType<boolean>;
204
+ readonly required: false;
205
+ readonly default: false;
206
+ };
127
207
  }>> & {
128
- "onUpdate:checked"?: ((...args: any[]) => any) | undefined;
208
+ "onUpdate:checked"?: ((_value: boolean) => any) | undefined;
129
209
  }, {
130
- readonly as: AsTag | Component;
131
- readonly asChild: boolean;
132
210
  readonly disabled: boolean;
211
+ readonly as: _destyler_primitive.AsTag | vue.Component;
212
+ readonly asChild: boolean;
133
213
  readonly checked: boolean;
134
214
  }, {}>;
135
215
 
136
- export { DestylerRadio, type DestylerRadioProps };
216
+ export { Radio, type RadioProps, radioEmits, radioProps };
@@ -1,85 +1,137 @@
1
- export { DestylerRadioGroupIndicator, DestylerRadioGroupIndicatorProps, DestylerRadioGroupItem, DestylerRadioGroupItemProps, DestylerRadioGroupRoot, DestylerRadioGroupRootProps } from './index.js';
1
+ export { f as RadioGroupIndicator, h as RadioGroupIndicatorProps, c as RadioGroupItem, e as RadioGroupItemProps, R as RadioGroupRoot, b as RadioGroupRootProps, g as radioGroupIndicatorProps, d as radioGroupItemProps, a as radioGroupRootEmits, r as radioGroupRootProps } from './shared/radio.54693474.js';
2
2
  import * as vue from 'vue';
3
- import { PropType, Component } from 'vue';
4
- import { AsTag } from '@destyler/primitive';
3
+ import { PropType } from 'vue';
4
+ import * as _destyler_primitive from '@destyler/primitive';
5
5
  import { ExtractPublicPropTypes } from '@destyler/shared';
6
6
 
7
- declare const destylerRadioProps: {
7
+ declare const radioProps: {
8
+ /**
9
+ * @default button
10
+ */
8
11
  readonly as: {
9
- readonly type: PropType<AsTag | Component>;
10
- readonly required: false;
11
12
  readonly default: "button";
12
- };
13
- readonly asChild: {
14
- readonly type: PropType<boolean>;
13
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
15
14
  readonly required: false;
16
- readonly default: false;
17
15
  };
16
+ /**
17
+ * The name of the input fields in the radio (Useful for form submission).
18
+ */
18
19
  readonly id: {
19
20
  readonly type: PropType<string>;
20
21
  readonly required: false;
21
22
  };
23
+ /**
24
+ * The value given as data when submitted with a `name`.
25
+ */
22
26
  readonly value: {
23
27
  readonly type: PropType<string>;
24
28
  readonly required: false;
25
29
  };
30
+ /**
31
+ * When `true`, prevents the user from interacting with the radio item.
32
+ */
26
33
  readonly disabled: {
27
34
  readonly type: PropType<boolean>;
28
35
  readonly required: false;
29
36
  readonly default: false;
30
37
  };
38
+ /**
39
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
40
+ */
31
41
  readonly required: {
32
42
  readonly type: PropType<boolean>;
33
43
  readonly required: false;
34
44
  };
45
+ /**
46
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
47
+ *
48
+ * @default undefined
49
+ */
35
50
  readonly checked: {
36
51
  readonly type: PropType<boolean>;
37
52
  readonly required: false;
38
53
  readonly default: undefined;
39
54
  };
55
+ /**
56
+ * The name of the input fields in the radio (Useful for form submission).
57
+ */
40
58
  readonly name: {
41
59
  readonly type: PropType<string>;
42
60
  readonly required: false;
43
61
  };
44
- };
45
- type DestylerRadioProps = ExtractPublicPropTypes<typeof destylerRadioProps>;
46
- declare const DestylerRadio: vue.DefineComponent<{
47
- readonly as: {
48
- readonly type: PropType<AsTag | Component>;
49
- readonly required: false;
50
- readonly default: "button";
51
- };
52
62
  readonly asChild: {
53
63
  readonly type: PropType<boolean>;
54
64
  readonly required: false;
55
65
  readonly default: false;
56
66
  };
67
+ };
68
+ type RadioProps = ExtractPublicPropTypes<typeof radioProps>;
69
+ declare const radioEmits: {
70
+ /**
71
+ * Event handler called when the radio item is checked.
72
+ */
73
+ 'update:checked': (_value: boolean) => boolean;
74
+ };
75
+ declare const Radio: vue.DefineComponent<{
76
+ /**
77
+ * @default button
78
+ */
79
+ readonly as: {
80
+ readonly default: "button";
81
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
82
+ readonly required: false;
83
+ };
84
+ /**
85
+ * The name of the input fields in the radio (Useful for form submission).
86
+ */
57
87
  readonly id: {
58
88
  readonly type: PropType<string>;
59
89
  readonly required: false;
60
90
  };
91
+ /**
92
+ * The value given as data when submitted with a `name`.
93
+ */
61
94
  readonly value: {
62
95
  readonly type: PropType<string>;
63
96
  readonly required: false;
64
97
  };
98
+ /**
99
+ * When `true`, prevents the user from interacting with the radio item.
100
+ */
65
101
  readonly disabled: {
66
102
  readonly type: PropType<boolean>;
67
103
  readonly required: false;
68
104
  readonly default: false;
69
105
  };
106
+ /**
107
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
108
+ */
70
109
  readonly required: {
71
110
  readonly type: PropType<boolean>;
72
111
  readonly required: false;
73
112
  };
113
+ /**
114
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
115
+ *
116
+ * @default undefined
117
+ */
74
118
  readonly checked: {
75
119
  readonly type: PropType<boolean>;
76
120
  readonly required: false;
77
121
  readonly default: undefined;
78
122
  };
123
+ /**
124
+ * The name of the input fields in the radio (Useful for form submission).
125
+ */
79
126
  readonly name: {
80
127
  readonly type: PropType<string>;
81
128
  readonly required: false;
82
129
  };
130
+ readonly asChild: {
131
+ readonly type: PropType<boolean>;
132
+ readonly required: false;
133
+ readonly default: false;
134
+ };
83
135
  }, {
84
136
  forwardRef: (ref: Element | vue.ComponentPublicInstance | null) => void;
85
137
  checkedRef: vue.WritableComputedRef<boolean | undefined>;
@@ -87,50 +139,78 @@ declare const DestylerRadio: vue.DefineComponent<{
87
139
  value: vue.Ref<string | undefined>;
88
140
  isFormControl: vue.ComputedRef<boolean>;
89
141
  handleClick: (event: MouseEvent) => void;
90
- }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "update:checked"[], "update:checked", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
142
+ }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
143
+ /**
144
+ * Event handler called when the radio item is checked.
145
+ */
146
+ 'update:checked': (_value: boolean) => boolean;
147
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
148
+ /**
149
+ * @default button
150
+ */
91
151
  readonly as: {
92
- readonly type: PropType<AsTag | Component>;
93
- readonly required: false;
94
152
  readonly default: "button";
95
- };
96
- readonly asChild: {
97
- readonly type: PropType<boolean>;
153
+ readonly type: PropType<_destyler_primitive.AsTag | vue.Component>;
98
154
  readonly required: false;
99
- readonly default: false;
100
155
  };
156
+ /**
157
+ * The name of the input fields in the radio (Useful for form submission).
158
+ */
101
159
  readonly id: {
102
160
  readonly type: PropType<string>;
103
161
  readonly required: false;
104
162
  };
163
+ /**
164
+ * The value given as data when submitted with a `name`.
165
+ */
105
166
  readonly value: {
106
167
  readonly type: PropType<string>;
107
168
  readonly required: false;
108
169
  };
170
+ /**
171
+ * When `true`, prevents the user from interacting with the radio item.
172
+ */
109
173
  readonly disabled: {
110
174
  readonly type: PropType<boolean>;
111
175
  readonly required: false;
112
176
  readonly default: false;
113
177
  };
178
+ /**
179
+ * When `true`, indicates that the user must check the radio item before the owning form can be submitted.
180
+ */
114
181
  readonly required: {
115
182
  readonly type: PropType<boolean>;
116
183
  readonly required: false;
117
184
  };
185
+ /**
186
+ * The controlled value of the radio item to check. Can be binded as `v-model`.
187
+ *
188
+ * @default undefined
189
+ */
118
190
  readonly checked: {
119
191
  readonly type: PropType<boolean>;
120
192
  readonly required: false;
121
193
  readonly default: undefined;
122
194
  };
195
+ /**
196
+ * The name of the input fields in the radio (Useful for form submission).
197
+ */
123
198
  readonly name: {
124
199
  readonly type: PropType<string>;
125
200
  readonly required: false;
126
201
  };
202
+ readonly asChild: {
203
+ readonly type: PropType<boolean>;
204
+ readonly required: false;
205
+ readonly default: false;
206
+ };
127
207
  }>> & {
128
- "onUpdate:checked"?: ((...args: any[]) => any) | undefined;
208
+ "onUpdate:checked"?: ((_value: boolean) => any) | undefined;
129
209
  }, {
130
- readonly as: AsTag | Component;
131
- readonly asChild: boolean;
132
210
  readonly disabled: boolean;
211
+ readonly as: _destyler_primitive.AsTag | vue.Component;
212
+ readonly asChild: boolean;
133
213
  readonly checked: boolean;
134
214
  }, {}>;
135
215
 
136
- export { DestylerRadio, type DestylerRadioProps };
216
+ export { Radio, type RadioProps, radioEmits, radioProps };